diff options
author | Dirk von Suchodoletz | 2006-03-08 00:53:39 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-03-08 00:53:39 +0100 |
commit | 6b35840508287cc979202dc10e9ba41fe9f162b3 (patch) | |
tree | 14e46ca38b99bd1f5a2fc9955a2ff5046e26270b /initrd/distro-specs | |
parent | started to add alternative configuration via file (tftp get from (diff) | |
download | core-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/distro-specs')
-rw-r--r-- | initrd/distro-specs/debian/functions-3.1 | 16 | ||||
-rw-r--r-- | initrd/distro-specs/suse/functions-9.3 | 21 | ||||
-rw-r--r-- | initrd/distro-specs/ubuntu/functions-5.10 | 6 |
3 files changed, 37 insertions, 6 deletions
diff --git a/initrd/distro-specs/debian/functions-3.1 b/initrd/distro-specs/debian/functions-3.1 index f0446010..cb92ffa2 100644 --- a/initrd/distro-specs/debian/functions-3.1 +++ b/initrd/distro-specs/debian/functions-3.1 @@ -2,13 +2,13 @@ # linux diskless clients (executed within initial # ramdisk after genconfig) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 18-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 08-03-2006 # Blabla # Blub # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.2.1a +# Version: 0.2.1b # distro specific stuff to initialize preinit () { @@ -30,6 +30,17 @@ for i in rc3.d/K$stop$script rc5.d/K$stop$script \ done } +# extended system users +extpasswd () { +echo -e "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\nbin:x:2:2:bin:/bin:\n\ +/bin/sh\nsys:x:3:3:sys:/dev:/bin/sh\nman:x:6:12:man:/var/cache/man:/bin/sh\n\ +sshd:x:100:65534::/var/run/sshd:/bin/false\nnobody:x:65534:65534:nobody:\n\ +/nonexistent:/bin/sh" >> /mnt/etc/passwd +echo -e "daemon:*:13021:0:99999:7:::\nbin:*:13021:0:99999:7:::\n\ +sys:*:13021:0:99999:7:::\nman:*:13021:0:99999:7:::sshd:!:13021:0:99999:7:::\n\ +nobody:*:13021:0:99999:7:::" >> /mnt/etc/shadow +} + # group of functions for the normal runlevels - first parameter is start # second stop # function for ntp configuration @@ -186,6 +197,7 @@ config_xdm () { # configure gdm as display manager config_gdm () { + # gdm user >> passwd echo >/dev/null } diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3 index 8de50678..cd1e527f 100644 --- a/initrd/distro-specs/suse/functions-9.3 +++ b/initrd/distro-specs/suse/functions-9.3 @@ -14,7 +14,7 @@ # distro specific stuff to initialize preinit () { -# do nothing yet +# do nothing here (might be needed for other versions) : } postinit () { @@ -22,8 +22,6 @@ postinit () { udevstart } - - # udev/hotplug - auto device discovery service udev_hotplug () { local result=0 @@ -48,6 +46,19 @@ for i in rc3.d/K$stop$script rc5.d/K$stop$script \ done } +# extended system users +extpasswd () { +echo -e "bin:x:1:1:bin:/bin:/bin/bash\ndaemon:x:2:2:Daemon:/sbin:\ +/bin/bash\nman:x:13:62:Manual pages viewer:/var/cache/man:/bin/bash\n\ +at:x:25:25:Batch jobs daemon:/var/spool/atjobs:/bin/bash\n\ +sshd:x:71:65:SSH daemon:/var/lib/sshd:/bin/false\n\ +nobody:x:65534:65533:nobody:/var/lib/nobody:/bin/bash" \ + >> /mnt/etc/passwd +echo -e "bin:*:8902:0:10000::::\ndaemon:*:8902:0:10000::::\n\ +man:*:8902:0:10000::::\nat:!:13078:0:99999:7:::\n\ +sshd:!:13078:0:99999:7:::\nnobody:*:13078::::::" >> /mnt/etc/shadow +} + # group of functions for the normal runlevels - first parameter is start # second stop # function for ntp configuration @@ -55,9 +66,11 @@ config_ntp () { local start="07" local stop="14" if [ -f /mnt/etc/init.d/ntp ] ; then - strinfile "ntp:" /mnt/etc/passwd || \ + if ! strinfile "ntp:" /mnt/etc/passwd ; then echo -e "ntp:x:74:65534:NTP daemon:/var/lib/ntp:/bin/false" \ >>/mnt/etc/passwd + echo -e "ntp:!:13099:0:99999:7:::" >>/mnt/etc/shadow + fi testmkd /mnt/var/lib/ntp/var/run/ntp &>/dev/null if [ "x$start_ntp" = "xinitial" ] ; then echo -e "\t# entry added by $0: $date" \ diff --git a/initrd/distro-specs/ubuntu/functions-5.10 b/initrd/distro-specs/ubuntu/functions-5.10 index 85dd0f3f..59024122 100644 --- a/initrd/distro-specs/ubuntu/functions-5.10 +++ b/initrd/distro-specs/ubuntu/functions-5.10 @@ -65,6 +65,12 @@ for i in rc3.d/K$stop$script rc5.d/K$stop$script \ done } +# extended system users +extpasswd () { +echo -e "" >> /mnt/etc/passwd +echo -e "" >> /mnt/etc/shadow +} + # group of functions for the normal runlevels - first parameter is start # second stop # function for ntp configuration |