Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the common command usermod in Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to use the Linux command usermod, which is very detailed and has a certain reference value. Friends who are interested must finish reading it!

Linux common commands usermod commands are used to modify user accounts, and usermod can be used to modify user account settings

Syntax usermod [- LU] [- c] [- d] [- e] [- f] [- g] [- G] [- l] [- s] [- u] [user account]

Parameter description:

-c modify the remarks of the user account. -d login directory > modify the directory when the user logs in. -e modify the validity period of the account. -f modify how many days after the password expires to close the account. -g modify the group to which the user belongs. -G modifies the additional group to which the user belongs. -l modify the user account name. -L locks the user's password, invalidating it. -s modifies the shell used by the user after login. -u modify user ID. -U unlocks the password. Example

Change the login directory

# usermod-d / home/hnlinux root

Change the user's uid

# usermod-u 777 root and above are all the contents of this article entitled "how to use Linux commands usermod". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report