Adding and Deleting user in Ubuntu
Add New User
$ sudo useradd user_name
Delete Existing User
$ sudo userdel user_name
$ sudo userdel -r user_name [to delete user's home dir too]
Logout loged in user
$ sudo pkill -KILL -u user_name
Written by Hikmat Dhamee
Related protips
2 Responses
Or just use adduser (http://manpages.ubuntu.com/manpages/trusty/en/man8/adduser.8.html) and deluser (http://manpages.ubuntu.com/manpages/trusty/en/man8/deluser.8.html).
They are friendlier front ends to the userdel and groupdel programs, removing the home directory as option or even all files on the system owned by the user to be removed, running a custom script, and other features.
over 1 year ago
·
Yes that's also.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Devops
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#