Linux – Add, Delete and Modify Users (adduser, deluser, passwd, chfn)

September 2, 2019 21173 Views

Find code and diagrams at: https://www.EliTheComputerGuy.com

Managing Users on Linux systems is very easy.

Add Users

sudo adduser username – adds users
Additional profile information is not required, but a comment is a good idea.
Delete Users

sudo deluser username – deletes the user, but not the profile folder
sudo rm -rf /home/username – deletes profile folder
User Account File

vim /etc/passwd – allows you to view the user account file
Changing Passwords

passwd – changes your pasword
sudo passwd username – changes password for another account
Change User Profiles

sudo chfn username – changes profile information for user accounts.
Locking Accounts and Other Tasks

sudo usermod -option username – allows you make some additional changes to user account abilities such as locking and unlocking accounts.

Leave a comment

Your email address will not be published. Required fields are marked *