summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-03-08 00:53:39 +0100
committerDirk von Suchodoletz2006-03-08 00:53:39 +0100
commit6b35840508287cc979202dc10e9ba41fe9f162b3 (patch)
tree14e46ca38b99bd1f5a2fc9955a2ff5046e26270b /initrd/initrd-stuff
parentstarted to add alternative configuration via file (tftp get from (diff)
downloadcore-6b35840508287cc979202dc10e9ba41fe9f162b3.tar.gz
core-6b35840508287cc979202dc10e9ba41fe9f162b3.tar.xz
core-6b35840508287cc979202dc10e9ba41fe9f162b3.zip
generate passwd/shadow from initrd ...
git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@94 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff')
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig5
-rw-r--r--initrd/initrd-stuff/etc/functions9
-rw-r--r--initrd/initrd-stuff/etc/machine-setup4
-rwxr-xr-xinitrd/initrd-stuff/init2
4 files changed, 17 insertions, 3 deletions
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index 7f7b419d..13d9ed3c 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -63,7 +63,10 @@ fi
localization $country
#######################################################################
-# setup passwd and shadow for local system users
+# setup passwd and shadow for local system users like root, bin, daemon
+# ...
+basepasswd
+extpasswd
#######################################################################
# dns and ip configuration
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions
index e80fdc67..90ded7fd 100644
--- a/initrd/initrd-stuff/etc/functions
+++ b/initrd/initrd-stuff/etc/functions
@@ -362,6 +362,15 @@ echo "not implemented" > /tmp/ldap-done
}
#######################################################################
+# base passwd/shadow, the standard user present in every system. All
+# other system users should be generated within the service function
+basepasswd () {
+echo -e "root:x:0:0:System Administrator:/root:/bin/bash" \
+ > /mnt/etc/passwd
+echo -e "root:"$root_pw":12958:0:10000::::" > /mnt/etc/shadow
+}
+
+#######################################################################
# localization simply derived from $language variable set in
# machine-setup or other sources - mostly taken from knoppix
localization () {
diff --git a/initrd/initrd-stuff/etc/machine-setup b/initrd/initrd-stuff/etc/machine-setup
index d9205997..35dc5a9c 100644
--- a/initrd/initrd-stuff/etc/machine-setup
+++ b/initrd/initrd-stuff/etc/machine-setup
@@ -6,7 +6,7 @@
# New settings are simply appended, so that they might
# overwrite previously defined variables
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-01-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 08-03-2006
# Blabla
# Blub
#
@@ -14,6 +14,8 @@
#
# format variable="value"
#
+# password of system administrator (root) as crypt -> 'dxs-root'
+root_pw='$2a$10$MoEYhIPZGCtR62R8UvBl3emNn2qMOuQpLQpfmNnhya4bGLhyF0pbu'
## name service configuration defaults
#
diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init
index 4927081d..b917189e 100755
--- a/initrd/initrd-stuff/init
+++ b/initrd/initrd-stuff/init
@@ -413,7 +413,7 @@ d_mkbootld close
# should be killed if started within init
killall -9 dhcpcd dhclient pump 2>/dev/null
-bash
+#bash
# post init for some distro specific
postinit