We help IT Professionals succeed at work.

useradd in unix

atwork2003
atwork2003 asked
on
1,730 Views
Last Modified: 2013-12-27
Hi

I used this command to add user to the group file:

File: /etc/group
Command: useradd -d /home/lsam lsam

It created the user but I dont see the user in the group while nither I can see a home dir created for the user in the path /home/Isam.

I thought I used command incorrectly so I tried to run it again and I get error that user already exists. I am not sure how to find this user and where is the user created. NEED HELP:)
Comment
Watch Question

CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thank you for the help. I found the user in the passwd file. But I am not sure why didnt the command created the user directory in the /home directory
CERTIFIED EXPERT

Commented:
>>But I am not sure why didnt the command created the user directory in the /home directory

because you use -d option to tell useradd command to do so.
man useradd
to learn more details.
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Great help, thank you so much Guys:) Appreciate it very much
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.