Common commands for Linux Account Management

Source: Internet
Author: User

/Etc/passwd SYSTEM account information
/Etc/shadow account password information is encrypted by MD5 32-bit
Add "*" in front of the password column 『*』『! "Forbidden to use an account
/Etc/group system group information
/Etc/gshadow
Newgrp change logon Group
Useradd & adduser create new user useradd-m test automatically create the user's login directory
Useradd-m-g pgroup test specifies the level
/Etc/default/useradd settings
/Etc/login. defs UID/GID settings
Passwd Change Password passwd test
Usermod
Userdel Delete account userdel-r test
Change the SHELL [-l] used when logging on to the system using chsh to display the available SHELL; [-s] modify your own SHELL.
Chfn changes the information displayed by the finger command
Finger finds and displays user information
Id: displays the user ID id test
Groupadd add Group
Groupmod is similar to usermod.
Groupdel Delete Group
Su test changes su-to root and uses the root environment variable.
Sudo executes commands in other identities
Visudo edit/etc/sudoers and add a line "test ALL = (ALL) ALL 』
% Wheel ALL = (ALL) ALL users in ALL the wheel groups in the system can use sudo.
% Wheel ALL = (ALL) NOPASSWD: ALL users in the wheel group do not use the NOPASSWD password.
User_Alias ADMPW = vbird, dmtsai, vbird1, and vbird3 are added to the ADMPW group.
Admpw all = NOPASSWD :! /Usr/bin/passwd,/usr/bin/passwd [A-Za-z] *, \
! /Usr/bin/passwd root can change the user password, but cannot change the root password (add it before the command! Cannot represent)
PAM (Pluggable Authentication Modules, Embedded Module)
Who & w view who is online
Last recent host login information
Lastlog recent logon time read/var/log/lastlog
Talk with other users
Write sending information write test [ctrl] + d send
Mesg sets the write permission for the terminal. mesg n prohibits receiving mesg y.
Wall sends a message to all users. wall this is q test
Mail write mail
/Etc/default/useradd home directory default settings

This note is shared by some common linux Account management commands. I hope you can learn it with us.

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.