sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
- From: Thomas Orgis <thomas-forum AT orgis.org>
- To: sm-discuss AT lists.ibiblio.org
- Subject: Re: [SM-Discuss] An update to shadow
- Date: Tue, 6 Mar 2007 15:30:46 +0100
So we have this adduser script in current spell which has been broken from
the start:
#!/bin/sh
if [ "$UID" == 0 ]; then
if [ -z "$1" ]; then
read -p "Username: " NEWSER
else
NEWSER=$1
fi
[ -d /home ] || mkdir /home
groupadd $NEWSER
useradd -m $NEWSER -g $NEWSER -s /bin/bash
[ -d /var/spool/mail ] || mkdir -p /var/spool/mail
touch /var/spool/mail/$NEWSER
chown $NEWSER:mail /var/spool/mail/$NEWSER
chmod 0660 /var/spool/mail/$NEWSER
passwd $NEWSER
echo "default shell for $NEWSER has been set to /bin/bash. Edit /etc/passwd
to change this"
else
su - -c "PATH=$PATH $0 $1"
fi
There are so many things wrong with this... ruskie points out the /home/users
instead of /home ... there's the /var/spool/mail stuff, which is infact
already handled by useradd.
My problem with this script is: Why is it there at all? What is the added
value to useradd? It is a freaking box of explosives doing unasked and
unannounced (help message, query) stuff.
Plain useradd is a lot nicer, for example it allows me to get some usage info
via -h or manpage.
I can set options. Instead of supplying this retarded (no offence, just my
opinion;-) script we should care to make the system defaults of useradd match
a default smgl setup (/home/$USER as home dir, for example).
So, my question of the moment is if this is a gating issue.
Shadow's search column on the stable-rc wiki is marked off and there is no
bug mentioned ... should we change this?
Thomas.
-
Re: [SM-Discuss] An update to shadow,
Jeremy Blosser, 03/01/2007
-
Re: [SM-Discuss] An update to shadow,
Andraž 'ruskie' Levstik, 03/02/2007
-
Re: [SM-Discuss] An update to shadow,
Jeremy Blosser, 03/02/2007
-
Re: [SM-Discuss] An update to shadow,
Andraž 'ruskie' Levstik, 03/02/2007
-
Re: [SM-Discuss] An update to shadow,
Jeremy Blosser, 03/02/2007
-
Re: [SM-Discuss] An update to shadow,
Thomas Orgis, 03/06/2007
-
Re: [SM-Discuss] An update to shadow,
Juuso Alasuutari, 03/06/2007
- Re: [SM-Discuss] An update to shadow, Jaka Kranjc, 03/06/2007
- Re: [SM-Discuss] An update to shadow, Jeremy Blosser, 03/06/2007
- Re: [SM-Discuss] An update to shadow, Jeremy Blosser, 03/06/2007
-
Re: [SM-Discuss] An update to shadow,
Juuso Alasuutari, 03/06/2007
- Re: [SM-Discuss] An update to shadow, Thomas Orgis, 03/06/2007
-
Re: [SM-Discuss] An update to shadow,
Thomas Orgis, 03/06/2007
-
Re: [SM-Discuss] An update to shadow,
Jeremy Blosser, 03/02/2007
-
Re: [SM-Discuss] An update to shadow,
Andraž 'ruskie' Levstik, 03/02/2007
-
Re: [SM-Discuss] An update to shadow,
Jeremy Blosser, 03/02/2007
-
Re: [SM-Discuss] An update to shadow,
Andraž 'ruskie' Levstik, 03/02/2007
Archive powered by MHonArc 2.6.24.