diff options
-rwxr-xr-x | adduser.local | 21 | ||||
-rwxr-xr-x | user-init | 15 |
2 files changed, 33 insertions, 3 deletions
diff --git a/adduser.local b/adduser.local index e264351..3bf6141 100755 --- a/adduser.local +++ b/adduser.local @@ -3,7 +3,7 @@ # /usr/local/sbin/adduser.local # Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk> # -# $Id: adduser.local,v 1.7 2002-03-14 15:28:41 jonas Exp $ +# $Id: adduser.local,v 1.8 2002-03-30 02:54:53 jonas Exp $ # # Common adduser additions for Spiff and Xenux networks # @@ -90,6 +90,25 @@ if [ -f /etc/local/users.conf ]; then fi fi +#if [ -n "$REALUSERS_GROUPNAME" ]; then + cat <<+ +Is this a remote or local user (with need for physical +access to devices like CD-ROM, soundcard and modem needed)? + ++ + echo -n "Grant this user access to local utilities (y/N)?" + read localuser + case $localuser in + y|Y) + for group in disk dialout cdrom audio video games; do + addgroup $NEWUSERNAME $group + done + ;; + *) + ;; + esac +#fi + if [ -x /usr/local/sbin/user-init ]; then /usr/local/sbin/user-init $NEWUSERNAME fi @@ -9,11 +9,22 @@ mac=".mac" pc=".pc" xchange=".xchange" -. /etc/adduser.conf || exit 1 +if [ -e /etc/adduser.conf ]; then + . /etc/adduser.conf +else + echo "/etc/adduser.conf missing. Exiting..." + exit 1 +fi [ -f /etc/local/users.conf ] && . /etc/local/users.conf -. /etc/local/volumes || exit 0 +if [ -e /etc/local/volumes ]; then + . /etc/local/volumes +else + # exit silently if this system lacks required hints + exit 0 +fi + XDIRREAL="$XDIR/users/root" if [ $XCHANGE ]; then |