Created
July 4, 2018 20:30
-
-
Save YordanGeorgiev/453258660f99fed24973ec39478fd4da to your computer and use it in GitHub Desktop.
[how-to edit a linux user] how-to edit a linux user #linux #user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# modify a user | |
usermod -a -G $group $user | |
# change the password for the specified user (own password) | |
passwd $user | |
#how-to forces to change password when logging in for the first time | |
passwd -f login | |
#change user pass to expire never | |
chage -I -1 -m 0 -M 99999 -E -1 $user | |
# and check results | |
chage -l $user | |
#Ei should not return anything !!! | |
passwd -s -a | grep NP (=No Password) | |
#delete an user | |
userdel $user | |
#administer the /etc/group file | |
gpasswd: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment