Skip to main content

how to check and add USER on Ubuntu


To check existing users in Ubuntu :
cut -d: -f1 /etc/passwd
 
To Add User in Ubuntu :

sudo adduser new_username
or:
sudo useradd new_username


To remove/delete a user, first you can use:
sudo userdel username

To delete the home directory for the deleted user account :
sudo rm -r /home/username
(Please use with caution the above command!)

To modify the username of a user:
usermod -l new_username old_username
 
To change the password for a user:
sudo passwd username


Comments

Popular posts from this blog

Backslash on mac

I had been struggling to type back slash ( \) character on mac japanese keyboard as they don't have it printed on the keyboard, and I was doing copy paste all the time from google when i needed to type it until recently a tip came to my rescue , shortcut to backslash on mac japanese keyboard. Alt + ¥  Hope it helps others.