0% found this document useful (0 votes)
67 views12 pages

Usermod Command and Some of Her Differents Ags: by Javier Conde Silva

The document discusses the usermod command in Linux, which is used to modify user accounts. It describes what usermod is used for and the various files it affects like /etc/passwd and /etc/shadow. The syntax for usermod is provided as usermod [options] LOGIN. Several common options for usermod are outlined, such as -u to change the user ID, -g to change the primary group, -G to add supplementary groups, and -L to lock an account. Sources for further information on usermod are also provided.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views12 pages

Usermod Command and Some of Her Differents Ags: by Javier Conde Silva

The document discusses the usermod command in Linux, which is used to modify user accounts. It describes what usermod is used for and the various files it affects like /etc/passwd and /etc/shadow. The syntax for usermod is provided as usermod [options] LOGIN. Several common options for usermod are outlined, such as -u to change the user ID, -g to change the primary group, -G to add supplementary groups, and -L to lock an account. Sources for further information on usermod are also provided.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Usermod Command

and some of her differents flags


by Javier Conde Silva
Whats usermod?
Whats usermod for?

● Usermod its a command that


modifies an user or an account
that already exist
Whats usermod for? ● When we execute ‘usermod‘
command in terminal, the
following files are used and
affected.
● /etc/passwd – User account
information.
● /etc/shadow – Secure
account information.
● /etc/group – Group account
information.
● /etc/gshadow – Secure group
account information.
● /etc/login.defs – Shadow
password suite configuration..
Usermod Sintax.
Usermod sintax ● usermod [options] LOGIN
Usermod Options
Usermod ● -C --comment COMMENT
○ with this flag you can change
Options the field number 5 of the
etc/passwd
● -d --home HOME_DIR
○ with this flag you change the
home directory of the user
● -e, --expiredate EXPIRE_DATE
○ this flag changes the
expiration date of the system
account AAAA-MM-DD
Usermod ● -g, --gid GROUP
○ changes the number o the
Options principal group of the user
(GID)
● -G, --groups
GROUP1[,GROUP2,...[,GROUPN]]]
○ Add more groups to the user
● -l, --login NEW_LOGIN
○ changes the the login of the
user
Usermod ● -L, --lock
○ blocks the user account, this
Options way he cant login in to the
system
● -s, --shell SHELL
○ changes the default shell of
the user
● -u, --uid UID
○ changes the userID of the
user
● -U, --unlock
○ unlocks a previously locked
account
Thanks for your
attention.
Sources:

● https://hoststud.com/resources/linux-usermod-command-with-examples.39/
● https://www.tecmint.com/usermod-command-examples/
● https://linux.die.net/man/8/usermod
● class notes

You might also like