Adding new users

Jeff mr2323a at
Fri Mar 22 16:15:49 PST 2002

From: "Tush" <tush at>
> For a new user say tushar:)
> userid=tushar
> grp=users
> homedir=/home/users/tushar
> othergrps=pkgmanager
> uid=1001
> realName="Tushar T"
> useradd -c ${realName} -m -d $homedir -g $grp -G ${othergrps} -s
/bin/bash -u $uid $userid

Maybe I'm a simpleton, but that seems a bit complex. If you want to get that
level, with less typing, couldn't you write about a 10 line interactive user
adding script where all you do is execute and answer the questions? I'm no
script writer, but that would seem the easiest if you're adding multiple
I personally setup the defaults for the "main" group, shell, and skel. The
rest are preset to my desire. Then I type: useradd -m username. Simple (for
simpletons, like me!) ;-)
I don't use the -p option to useradd, it escapes the MD5 encryption that way!
You can leave it out and user passwd username instead.

Unsubscribe: send email to listar at
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list