Linux permissions

Permissions: user management (add, delete, modify and check users), group management, permission management

  User management: useradd, userdel, passwd, usermod, finger, id, chage

    useradd [options] username: add user; userdel username: delete user options = -u UID , -g GID basic group, -G GID additional group, -s shell

    passwd username(default=root) Enter=="Enter password

    echo "password" | passwd --stdin username ==> Change the user's password to "password"

    id username == "View the user's id

  Rights management: 9 digits, 3 groups*3 digits

    Group 1: file owner permissions

    Group 2: Permissions for other group members in the group where the file owner belongs

    Group 3: Other User Permissions

    chmod o+(-)w filename: increase (decrease) w permissions for other users

    chown group name: user name file name == "change the owner of the file to the corresponding user name under the group name

    chmod g+w file: add w permission to group

    chmod 666 (777) 1.txt adds w (all) permissions to all groups

    chmod -R o+w directory name: add w permissions to all files in the directory

 

 

    

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325078588&siteId=291194637