Linux Learning Notes (11) User group management, user management

Source: Internet
Author: User

One, Linux and Windows inter-pass files
    1. There are two ways that I can learn Linux and Windows to pass files.

yum install -y lrzsz
Enter SZ + file
You can transfer your Linux files to Windows
RZ can choose to transfer Windows files to Linux
(This method can be used for Xshell,putty not supported)
2.xftp
Another component of Xshell that can be graphically transmitted to and from a file.
Download link
Https://www.netsarang.com/products/xfp_overview.html

Ii. user profile and password configuration file

This is generally not used, only as an understanding
http://man.linuxde.net/passwd
This post is very detailed, centos7 most of the same, but the new user ID and group ID is 1000 later
/etc/passwd
/etc/shadow Store user-related information
/etc/group
/etc/gshadow Store user group related information

/etc/passwd-
/etc/shadow-This type of file is a backup of user-related information

Third, user group management

groupadd grp1
New user groups
groupadd -g 1006 grp2
Add a user group, and specify a group ID of 1006

groupdel  grp1

Delete a GRP1 user group
User groups must be determined that no users are already in the user group before they can be deleted

Iv. User Management

useradd user1
New user
useradd -u 1005 -g grp2 -d /home/chinantfy -s /sbin/nologin user2
Add user and specify UID and group, specify home directory and Sbin

useradd -M user5创建用户但是不创建家目录

This time though Tail-n 3/etc/passwd
Can see the user User5 has home directory, but LS can find that the directory does not exist
New user If you do not specify a user ID, then its user ID is the last new user's id+1, the group ID does not have this limit, generally not specified separately, will be the same as the user ID
Useradd is the same as adduser usage

userdel -r user2

Deleting a user without the-r option does not delete the user's home directory

Linux Learning Notes (11) User group management, user management

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.