3, user management & document rights management command

User Management Commands

  • increase user: useradd 新用户名称
  • Change User Password: passwd 新用户名New users need to set a password, or can not log in
  • Change the user's shell: chsh [-s 登录的shell路径] [用户名]Note that you need to enter a password to change the shell, if it is a terminal emulator, just after the restart shell that is about to change.
  • Change user data: chfn
  • Changes to the system administrator root: su [-][用户名[参数]]
  • It allows the average user to perform certain commands as root user:sudo 命令
    • Note: let the user use this feature, the super user must configure Sudoers files, configuration commands to visudo Sudoersauthorize users based on their file formats.

Rights management command file

  • Change the file's owner (owner or group):chown 使用者账号 文件或目录名
  • Change their group file:chgrp 群组名称 文件或目录
  • Change file permissions: chmod [ugoa][+-=][rwx] filenameor chmod 权限数字 filename, for example,chmod 777 text.txt

hare
2020.3.26

Guess you like

Origin www.cnblogs.com/hare1925/p/12572731.html