Adding new users

ira mendell ibm at
Sat Mar 23 18:25:49 PST 2002

ira mendell wrote:

> Hello,
>     I've searched through the lfs hints and faq and have read the man
> useradd; man passwd and man groupadd.
>     I've created etc/skel with apropriate files.
> I want to add a user, add its password and add its new group.  Am I on
> the right track with the following command:
> useradd -m<newuser> -n<newuser> -p<newuser password> -u<newuser>
> Would this do what I hope it would do?
>   Thanks for any comments.
>             Ira

First I'd like to thank all for your help as I work this out.  Even
though I've gotten some scripts that I'm trying to get working I'd like
to try it the hard way so I can learn.

  I tried the following:

            groupadd <name>
            useradd -m -g <group name> -c"user name" <login name>
            passwd <login name>

This managed to create a home directory and copied the correct files from
the skel directory.  In the etc/groups the group name is there with a id
of 100 however it apears that the user id according to etc/passwd is 1000

   ie:   <user name>:x:1000:100.:/home/<user name>:/bin/bash

     my etc/defaults/useradd shows:


as a side note when I looked at the new home directory created,  through
KDE in Redhat,  it showed the directory and files as GROUP="users"
and OWNER="1000"

I think I'm close would adding a default such as USERS=100 to
etc/defaults work.

             Thank you.

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