adding users

adding users

Post by Simon Kissle » Fri, 19 Jul 1996 04:00:00




> How do i add user accounts (as root) when i'm logged in via telnet and can't
> use x windows?  is there a script available (such as adduser or useradd), and
> if not, what all do i have to do?

> thanks


check out the manpage for useradd ... it's a bit cryptic, but maybe with
a little shell program and a small script it could be made very nice in
a matter of a few minutes.

                                Simon Kissler
                                Electronic Information Services
                                Valparaiso University

 
 
 

adding users

Post by Juan R. Guzma » Fri, 19 Jul 1996 04:00:00



> How do i add user accounts (as root) when i'm logged in via telnet and can't
> use x windows?  is there a script available (such as adduser or useradd), and
> if not, what all do i have to do?

> thanks


You got it!  Try "man useradd".

 
 
 

adding users

Post by Matt Cer » Fri, 19 Jul 1996 04:00:00


How do i add user accounts (as root) when i'm logged in via telnet and can't
use x windows?  is there a script available (such as adduser or useradd), and
if not, what all do i have to do?

thanks

 
 
 

adding users

Post by John E. Keet » Sat, 20 Jul 1996 04:00:00


Matt...
/usr/sbin/useradd
vixen# useradd
UX: useradd: ERROR: invalid syntax.
usage:  useradd [-u uid [-o] | -g group | -G group[[,group]...] | -d dir |
                -s shell | -c comment | -m [-k skel_dir] | -f inactive | -e expire ] login
        useradd -D [-g group | -b base_dir | -f inactive | -e expire ]
vixen#

This is on a Solaris x85 2.5 box...

Hope this helps..

% How do i add user accounts (as root) when i'm logged in via telnet and can't
% use x windows?  is there a script available (such as adduser or useradd), and
% if not, what all do i have to do?

% thanks

--

John Keeton  /  KB0VEH


http://www.umr.edu/~keeton

 
 
 

adding users

Post by Brian S. Craigie - Unix SA - NEC - Scotla » Sat, 20 Jul 1996 04:00:00




Quote:> Matt...
> /usr/sbin/useradd
> vixen# useradd
> UX: useradd: ERROR: invalid syntax.
> usage:  useradd [-u uid [-o] | -g group | -G group[[,group]...] | -d dir |
>                 -s shell | -c comment | -m [-k skel_dir] | -f inactive | -e
expire ] login
>         useradd -D [-g group | -b base_dir | -f inactive | -e expire ]
> [snip]

Cripes!!

Help m'boab! etc.

Jings!  You not got any man pages on your system, laddie?

Recommend:- never just run a command like that to find out what the paramters
are; one day it'll bite you on the nose.  If you _must_ , at least use -? or
-help or something innocuous.

All the best!
--

Best Regards,

Brian Craigie

Unix Sys Admin in Scotland

My views are not necessarily those of my employers...
or anyone else for that matter...

<<< Would sixty gallons be sufficient? -- Robby the Robot >>>

 
 
 

adding users

Post by Jose A. Rosen » Tue, 23 Jul 1996 04:00:00




>How do i add user accounts (as root) when i'm logged in via telnet and can't
>use x windows?  is there a script available (such as adduser or useradd), and
>if not, what all do i have to do?

>thanks


Fisrt (and better): useradd. Be careful, I am not sure, but perhaps you have
to create the user directory manually.

Second (not as good): edit /etc/passwd and add the line for the new user. That
 has worked on any system I have tried except sometimes under Solaris 2.5
where most of the times I can not assign the new passwd (passwd username)
because the user is supposed (by the computer) not to exist.

 
 
 

adding users

Post by Alan Coopersmi » Tue, 23 Jul 1996 04:00:00



|Fisrt (and better): useradd. Be careful, I am not sure, but perhaps you have
|to create the user directory manually.

There's an option to create the directory and copy the files from /etc/skel,
and another option to specify your own default set of files.

|Second (not as good): edit /etc/passwd and add the line for the new user. That
| has worked on any system I have tried except sometimes under Solaris 2.5
|where most of the times I can not assign the new passwd (passwd username)
|because the user is supposed (by the computer) not to exist.

If you must do this, use /usr/ucb/vipw which will check the file for
mistakes before you cause damage, and which will also have you edit
the shadow file to add the user there as well.  (However, if you have
any untrusted users on your system you probably want to install the vipw
security patch to prevent them from getting a glimpse at your shadow
file while you're editing it.)

--
_______________________________________________________________________

The Open Computing Facility at the University of California at Berkeley

 
 
 

adding users

Post by Daniel Litt » Wed, 24 Jul 1996 04:00:00



=>|Second (not as good): edit /etc/passwd and add the line for the new user. That
=>| has worked on any system I have tried except sometimes under Solaris 2.5
=>|where most of the times I can not assign the new passwd (passwd username)
=>|because the user is supposed (by the computer) not to exist.
=>
=>If you must do this, use /usr/ucb/vipw which will check the file for
=>mistakes before you cause damage, and which will also have you edit
=>the shadow file to add the user there as well.  (However, if you have

Just run pwconv to sync the two files. Then you can use passwd to set
the users password. If you're running NIS+, this probably wont be
sufficient.

Daniel.
--
--

Escape Communications Corp.           |          http://www.escape.ca

 
 
 

adding users

Post by Michael Douglas » Fri, 02 Aug 1996 04:00:00



> Fisrt (and better): useradd. Be careful, I am not sure, but perhaps you have
> to create the user directory manually.

Be warned that useradd forks() and then execs() /usr/sbin/passmgmt which does
not perform correct file locking on /etc/passwd and /etc/shadow via the
/etc/ptmp and /etc/stmp files.  If you have two or more instances of passmgmt
(and other broken utilities) running at the same time, you could end up with
a badly munged up password file.  I just posted a note about this to this
news group if you want to read up more on the details.

Quote:>Second (not as good): edit /etc/passwd and add the line for the new user. That
> has worked on any system I have tried except sometimes under Solaris 2.5
> where most of the times I can not assign the new passwd (passwd username)
> because the user is supposed (by the computer) not to exist.

You have to make sure that you also add a line in /etc/shadow for the user.
Otherwise the system will report that they do not exist.

Michael Douglass
Texas Networking, Inc.

  "To be a saint is to be an exception; to be a true man is the rule.
   Err, fail, sin if you must, but be upright.  To sin as little as
   possible is the law for men; to sin not at all is a dream for angels."

              - Victor Hugo, "Les Miserables"