Add user or linux/unix user creation

Add user or linux/unix user creation

#adduser <User_Name>
This will create a user with default home directory settings defined on system

ie. Home directory path(when user log into system will see this directory) will  be  /home/User_Name

If you want to add custom path for user’s home directory

#adduser <User_Name> -d /opt/User_Name
Here you are assigning home directory with option -d

If you want to add custom home directory path and add user into an existing group.

#adduser <User_Name> -d /opt/User_Name -g Group_Name

Adding a parameter -g will assign this new user under given existing group along with custom home directory path.

Force user to change password on their first successful login

#chage -d 0 User_Name

 

This entry was posted in Unix/Linux. Bookmark the permalink.

One Response to Add user or linux/unix user creation

  1. Pingback: max

Leave a Reply