add a user: sudo adduser [newuser]
[bash]sudo adduser john[/bash]
then give password, and setup home folder,when prompted
edit the list of super users
change password of a user – sudo passwd [username]
[bash]sudo passwd john[/bash]
to change your password you can just use sudo passwd.
[bash]sudo deluser username[/bash]
This will not delete the home folder (and subfolder) those must be dealt with separately. A new user created with the old user name would have access to those files.
temporarily lock a user account – Simply locking a user account will not prevent a user from logging into your server remotely if they have previously set up RSA public key authentication.
[bash]sudo passwd -l username[/bash]
To unlock the account
[bash]sudo passwd -u username[/bash]
Groups are used in to control permissions (see file permissions)
add user to a group
usermod -G [group-name] [username]
[bash]usermod -G basketball john[/bash]
using the -G switch ads the group as a supplemental group. Using -g would make the group that users primary group.
see what groups a user is in
add a new group: groupadd [new_group_name]