From 6b35840508287cc979202dc10e9ba41fe9f162b3 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Tue, 7 Mar 2006 23:53:39 +0000 Subject: generate passwd/shadow from initrd ... git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@94 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/bin/servconfig | 5 ++++- initrd/initrd-stuff/etc/functions | 9 +++++++++ initrd/initrd-stuff/etc/machine-setup | 4 +++- initrd/initrd-stuff/init | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) (limited to 'initrd/initrd-stuff') 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 @@ -361,6 +361,15 @@ error " The configuration via ldap is not implemented yet." 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 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 , 30-01-2006 +# Author(s): Dirk von Suchodoletz , 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 -- cgit v1.2.3-55-g7522