User Management Utility commands (version 2), User Management Version 2

Source: Internet
Author: User
Tags md5 encryption net command

User Management Utility commands (version 2), User Management Version 2
User management commands

Pwck # detect the/etc/passwd file # If the/etc/passwd is incorrect, the system will prompt


Vipw # edit the/etc/passwd file. The only difference between vipw and VI will lock the/etc/passwd file.


Id # view User id and group information


Finger [username] # view User details [you may need to install it on your own]

Su switching user # added-there will be an environment variable to switch to the Home Directory [added-,-left and right spaces], while su will not


Passwd-S [username] # view the User Password status

Passwd-d # delete user password

Passwd-l or usermod-L # Lock the user

# Usage: for example, this user has violated regulations and does not need to be used for a long time. Principle Analysis: add one or two more passwords to the/etc/shadow file! Because the length of the md5 encryption password is fixed, in this case, the password cannot match!

 

Passwd-u or usermod-U # unlock a user

Who, w # view the current login user information, w displays more details

Up indicates the time when the system is running.

Users logging on locally: ppy1, ppy2...

Remote login users: pts/1, pts/2...

 

 

Chage [Option] [username] # managing passwords

-L view user password settings

-M: minimum number of days for password Modification

-Maximum number of days for M password Modification

-D Date of last password Modification

-I. the number of days the account is locked after the password expires

-E: Set the password expiration date. If it is 0, the password will expire immediately. If it is-1, the password will never expire.

-W: set the number of days before the password expires.

 

 

User Group Management commands

Add User Group:

Groupadd name

Groupadd-g 888 webadmin # create a user group webadmin whose GID is 888

 

Delete user group:

Groupdel [group name]

 

Modify user group information:

Groupmod-n

Groupmod-n apache webadmin # modify the name of the webadmin group to apache

 

Expansion command:

Group

Newgrp switching User Group

Grpck user group configuration file detection, similar to pwck usage and Significance

Chgrp modify the group to which the file belongs

Edit the/etc/group file in vigr and lock the file during editing.

 

Manually delete a user

Use the find command to find files belonging to a user or user group:-user,-uid,-group,-gid

For example, find/home-user test

1. Move and back up files to be retained

2. Delete unnecessary files

3. Clear related table items in the User File

4. Clear the user's home directory

 

Expansion-

[Enable/disable the shadow function]

Pwconv/pwunconv

Kgconv/grpunconv

 

[Authconfig]

Linux provides more powerful tools to change many settings

Permanently valid. edit/etc/sysconfig/authconfig.

 

[Use graphical tools for management]

System-config-[Tab] [Tab]

System-config-users # Set users


How to use the net command to set a user as an administrator user

Run the "net user abcd/add" command to add a user named abcd. Run the "net local group administrators abcd/add" command to promote the user abcd to the Administrator and restart the computer, log On As an abcd user

How can I add administrator permissions to a user using commands?

Net use \ ip \ ipc $ ""/user: "" Create an empty IPC Link
Net use \ ip \ ipc $ "password"/user: "user Name" Create an IPC non-empty Link
Net use h: \ ip \ c $ "password"/user: "user Name" directly log on and map to the other Party C: to the local

H:
Net use h: \ ip \ c $ after login ing to the other Party C: to the local H:
Net use \ ip \ ipc $/del Delete IPC Link
. Net use h:/del: Delete the H ing from the ing peer to the local host that is h:
Net user username and password/add create user
Net user guest/active: yes to activate the guest user
. Net user.
Net user account name view account attributes
Net localgroup administrators user name/add "user" to the Administrator
Reference: www.protocol.com.cn/archiver/tid-7491.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.