X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F21-usersetup;h=ac63a8d7b8785fb34b43d25e6e6047c26dac1bb5;hb=a909319fed99a591b453b235afa220ed4308b5be;hp=47d152535ff233b410966621b217004c24b28cad;hpb=3428f9ddf26373bac34a66ac0c2e15f3120e697c;p=grml-live.git diff --git a/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup b/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup index 47d1525..ac63a8d 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup +++ b/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup @@ -1,19 +1,14 @@ -#!/bin/sh -# Filename: /etc/grml/fai/config/scripts/GRMLBASE/21-usersetup +#!/bin/bash +# Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/21-usersetup # Purpose: adjust user setup of the live-system # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Thu May 08 15:30:20 CEST 2008 [mika] ################################################################################ set -u set -e - -USERNAME='' -[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf -[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local -[ -n "$USERNAME" ] || USERNAME=grml +. "$GRML_LIVE_CONFIG" if grep -q "$USERNAME:x:1000" $target/etc/group ; then echo "group $USERNAME exists already, skipping" @@ -54,6 +49,7 @@ add_user_to_group floppy add_user_to_group fuse add_user_to_group games add_user_to_group nvram +add_user_to_group netdev add_user_to_group plugdev add_user_to_group scanner add_user_to_group sudo @@ -68,16 +64,10 @@ add_user_to_group voice sed -i 's/^root::/root:*:/' $target/etc/shadow sed -i "s/^$USERNAME:!:/$USERNAME:*:/" $target/etc/shadow -# make sure users can log in on consoles 4, 5 and 6 if username != grml: -if [ "$USERNAME" != "grml" ] ; then - sed -i "s/-u grml -g grml --autologin grml/-u ${USERNAME} -g ${USERNAME} --autologin ${USERNAME}/" \ - $target/etc/inittab.grml -fi - if [ -r $target/bin/zsh ] ; then $ROOTCMD chsh -s /bin/zsh root $ROOTCMD chsh -s /bin/zsh $USERNAME fi ## END OF FILE ################################################################# -# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2