Top 8 Linux Commands for User Management
As a Linux administrator, there are many tasks you’ll find yourself managing. And no matter how you try and avoid the command line, at some point it’s going to become quite evident that the terminal is a must-use. You’ll find yourself faced with working on a headless server, or remoting into your data center, at which point the command-line Interface will become your best friend.
But how can you manage users from the CLI? Believe it or not, you have plenty of tools available. Within this guide, created by Jack Wallen for TechRepublic Premium, you’ll find all the commands you need to manage users from the command line on a Linux machine.
Featured text from the download:
userdel
Although you can temporarily disable a user with the useradd command, there might be times when you need to completely remove a user from your system. When that time comes, you turn to the userdel command. If you invoke the command sudo userdel vega, the command will delete the user ‘vega’, but it’ll leave behind /home/vega. To delete both the user and the home directory, you must use the -r option like so:
sudo userdel -r vega
If the user is still logged into the system (for whatever reason), the command will fail. To delete the user while they are logged in (which will automatically log them off), use the -f option like so:
sudo userdel -f -r vega
The user is gone.
Enhance your Linux knowledge with our in-depth eight-page PDF guide. Previously priced at $49, this is now available for download at just $9. Alternatively, enjoy complimentary access with a Premium annual subscription. Click here to find out more.
TIME SAVED: Crafting this content required 16 hours of dedicated writing, editing, research and design.
Resource Details
* Sign up for a TechRepublic Premium subscription for $299.99/year, and download this content as well as any other content in our library. Cancel anytime. Details here.
* Sign up for a TechRepublic Premium subscription for $299.99/year, and download this content as well as any other content in our library. Cancel anytime. Details here.