Adding new users

ira mendell ibm at bestweb.net
Fri Mar 22 17:30:04 PST 2002


Jeff wrote:

> From: "ira mendell" <ibm at bestweb.net>
> >     I've searched through the lfs hints and faq and have read the man
> > useradd; man passwd and man groupadd.
> > 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>
> My man page doesn't show a useradd -n option. ??
> If creating a new user in a new group, you have to create the group _first_,
> then add the user to that group.
>
> --
> Unsubscribe: send email to listar at linuxfromscratch.org
> and put 'unsubscribe lfs-support' in the subject header of the message

Hi Jeff,
  First my mistake.  I am using Redhat 7.2 as the host distro.  and I didn't
realize that they added items to the man useradd.  your right -n is only in the
Redhat version.
  A script would be better if I knew how to write one.

I gather the long way is in order then;
 1)  groupadd -g(gid) <newuser name>
 2) useradd -m<newuser name>
 3) passwd <newuser>
 4) cd /home/<newuser>
 5) chown -R <newuser>

I hope this is getting closer.  I think I still would have to set user id?
and change permissions?

                     Ira





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



More information about the lfs-support mailing list