用户,用户组相关文件

/etc/passwd 记录所有用户

/etc/group  记录用户与用户组信息

useradd -m -s /bin/bash nagios  #添加用户nagios -m创建用户文件夹/home/nagios  -s /bin/bash 使用bash功能 比如tab键补全

passwd nagios

groupadd nagcmd  #添加用户组nagcmd

usermod -G nagcmd nagios  #将用户nagios添加到nagcmd
cat /etc/passwd #可以查看所有用户的列表
w #可以查看当前活跃的用户列表
cat /etc/group #查看用户组
groups #查看当前用户所属用户组

 

 


相关文章:

  • 2021-11-24
  • 2021-06-20
  • 2021-12-27
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2021-12-19
  • 2021-05-15
猜你喜欢
  • 2021-10-21
  • 2021-05-06
  • 2021-07-03
  • 2021-12-19
  • 2022-02-08
  • 2022-12-23
相关资源
相似解决方案