What option is used with the useradd command to specify the users - ProProfs Discuss
Advertisement

What option is used with the useradd command to specify the users home directory?

Asked by Nicholas, Last updated: Apr 14, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

John Smith

John Smith

John Smith
John Smith

Answered Sep 08, 2016

-d-useradd command is used to add the user in the system. by default it creates the users home directory in /home if you want to specify the users home directory in different location use the -d and name of directory with path. example: useradd -d /var/user1 user1 useradd -s /bin/sh user1 : sets the sh shell as default shell to user user1 after adding the user use the usermod command to change the users home directory, login shell, account lock, account unlock etc.
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.