Ubuntu Delete remove a user

Ubuntu: Delete (remove) a user on Linux Ubuntu server. Before starting to this tutorial, you should be on root user first. Now do the following command:
userdel demo
Or if you want to remove the user files then use command:
userdel -r demo
If the user has root privileges, you may wish to remove it.
visudo
Find the following code
# User privilege specification
root ALL=(ALL:ALL) ALL
demo ALL=(ALL:ALL) ALL
Remove the 3rd line. You should see only root:
# User privilege specification
root ALL=(ALL:ALL) ALL
Save the changes by pressing ctrl+o and exit ctrl+x

0 comments:

Copyright © 2012 My Linux Code