useradd

hi
id like to use the command "useradd" but when i type
useradd i get "usage" and the related options

could anyone supply an example of how to add the user "paul"
i guess that a home dir has to be specified and a passwd and maybe some other stuff but i dont know what...or how to do it for that matter

thanks
paul
paulwhelanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

alextrCommented:
useradd -d /home/paul -s /bin/csh paul

This is the minimum. Anyway you can type man useradd for details
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
paulwhelanAuthor Commented:
i typed "man useradd"
but there is no entry for it...
How can i get these man pages?
0
paulwhelanAuthor Commented:
also when i add this user and login i get this upon logging in

No directory! Logging in with home=/
Sun Microsystems Inc.   SunOS 5.7       Generic October 1998  
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

alextrCommented:
You must create the directory before or use switch -m.

Why don't you have man pages? Didi you install them when you installed SO?
0
paulwhelanAuthor Commented:
where do i type in "switch -m"
in what dir? and as root or as the user?
How exactly do I go about installing the man
pages....I never got the option when installing
solaris 7 on the server
thanks
paul
0
alextrCommented:
use

useradd  -d /home/paul -m -s /bin/csh paul

or execute
mkdir /home/paul
useradd -d /home/paul -s /nib/csh paul
chown paul /home/paul

for man page check if you have the path /usr/man in the MANPATH environment variable (to check execute
echo $MANPATH)
Otherwise in your .cshrc file insert

setenv MANPATH  ${MANPATH}:/usr/man


0
paulwhelanAuthor Commented:
doing
useradd  -d /home/paul -m -s /bin/csh paul
gave me
UX: useradd: ERROR: Unable to create the home directory: Operation not applicable.

also
mkdir /home/paul
mkdir: Failed to make directory "/home/paul"; Operation not applicable

??

also .cshrc was worryingly empty
i inserted the line u recommended and rebooted....

paul
0
alextrCommented:
You must be root user!!!
Have you the /home directory existing? If no, please use the home directory for users choosen in your system (sometimes it can be /export/home, but the it is the SYSADM who decides it).

What .cshrc are you looking at? It must be the one related ot the user you are still logged in, just to execute 'man useradd'. If you are logged in as root insert in .cshrc of root the line I told you. If you are logged in as a different user insert in .cshrc of this user
0
paulwhelanAuthor Commented:
i did all that as root

 /.cshrc was empty until i inserted the line you told me, now it contains just that one line

........i successfully added a user into /export/home

0
paulwhelanAuthor Commented:
also when i type in "whoami" when i login as "paul"
it says command not found.....
0
alextrCommented:
The problem is that in  environment you don't have any configuration.

You may do this

cp /etc/skel/local.cshrc ~root/.cshrc
cp /etc/skel/local.login ~root/.login

Or copy them to amy user you want to set (e.g. paul)

So you have a minimal environment setting.
If you want you can add any path in .cshrc file for line 'path' as well as the following

 /usr/sbin /usr/ccs/bin /etc  /usr/openwin/bin /usr/local/bin)

and any other path you want to have.
Then type 'source .cshrc' to have the setting works.

0
paulwhelanAuthor Commented:
doh!
edited the .cshrc file and then.....
#source .cshrc
source: not found

it just gets better and better eh?

thanks for the help
0
alextrCommented:
I see you have a very bad environment :-(
Anyway, logout and login again (it is a very bad trick, but it works around); it reload the .cshrc
What is your shell for your user?
0
paulwhelanAuthor Commented:
im not sure....csh?
maybe...
0
alextrCommented:
echo $SHELL
0
paulwhelanAuthor Commented:

#echo $SHELL
/bin/csh
0
alextrCommented:
I guess now it is all right, since you logged out and logged in. Is it the truth?
Anyway, if you want to get a good .cshrc for your user you may post your e-mail and I can provide it to you.

Now  I think it's time for me to gain point ;-)
Do you agree?
0
paulwhelanAuthor Commented:
sure do
boof1999@yahoo.com
thanks....
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.