linux user

A: user

1, create user test01, test01 user will generate a directory in / home / below

  useradd test01

  ssh test01 @ ip login prompt must have a password

2, change the password

  passwd test01 (Enter password)

  passwd (enter, change the root password)

3, view the user information

  id username

4, delete users

  userdel username

4, additional user group information (user test01 group added to testshare)

  usermod -a -G testshare  test01 

II: group

1. Create group

  groupadd group

2. Delete Group

  groupdel group

Three: directory permissions

1. Create a directory testshare

  mkdir testshare

2, view directory permissions

  ll testshare

  drwxr-xr-x (1, first letter is represented by: d directory - file 2, rwx (read, write operation right), 3, 3 represents the front of the rights holder, intermediate representation is holding group permissions, the last three represent other people's rights)

    x; the ability to execute the file (usually executable file)

    x: directory permissions to enter the directory

3, change the directory to hold user group information

  chowd user: group directory: Change directory owner, holds group information, the holder of the situation did not write the original default user

  chown: Test hare testsare

4, modify the directory permissions (character mode)

  chmod a (All) U (User) g (group) o (others) + (increase) / - (decrease) rwx (permission) testsare

  chmod g + w testsare (testsare group permissions w increases)

  chmod o-rx testsare (testsare other minus rx permission)

6, modify the directory permissions (numerically)

  1 1 1 (binary 0011, 0102, 0113 and so on) (100: 4, 010: 2, 001: 1)

  r w x

  

Guess you like

Origin www.cnblogs.com/abel-he/p/11062459.html