Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] An update to shadow

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Juuso Alasuutari <iuso AT sourcemage.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] An update to shadow
  • Date: Tue, 6 Mar 2007 16:35:07 +0200

On Tuesday 06 March 2007 16:30, Thomas Orgis wrote:
> 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?

I've been wondering for a while why adduser doesn't work, but I haven't asked
around. I'm surprised to hear it's because our shadow installs something like
this! You should definitely file a bug, and I'd consider this one gating.

The X in the Stable-0.8 wiki doesn't mean it's signed off, it's simply there
because someone did a Bugzilla search and it turned out clean. Would you mind
shepherding this one so it's fixed?

--
Juuso Alasuutari
[[ Source Mage GNU/Linux ]]

Attachment: pgpDneW3sKTze.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page