Linux - Modifying existing user home directory home directory, Usermod change existing home directory

Modifying existing user home directory home directory

You can alter user account information by editing /etc/passwd file.
 # vi /etc/passwd 
You can change the users home directory in the /etc/passwd file and copy the files to new location.

It is recommended that you use usermod to avoid any syntax errors:

usermod : Utility to modify existing user accounts.
 # usermod -d /opt/rhome/kamath kamath
This will change the user kamath's home directory to /opt/rhome/kamath

passwd: Change password for an account. You can also use passwd to temporarily lock and unlock an account (without changing a password)
 # passwd -l user_name
Temporarily lock the user from logging in.

 # passwd -u user_name
Unlock the account

chsh: Change default shell for a user. As a root user you can change default shell for any user. A non-root user can change their own default shell using chsh.

chfn : The finger information can be changed with this command - like the name, phone number, etc.

The topic on Linux - Modifying existing user home directory home directory is posted by - Math

Hope you have enjoyed, Linux - Modifying existing user home directory home directoryThanks for your time

Tech Bluff