[root@localhost data]# useradd agent # 新增用户agent,agent属组为agent
[root@localhost data]# useradd test # 新增用户test,test属组为test
[root@localhost scripts]# chmod +x test.sh # 增加执行权限
[root@localhost quantitative-manager_agent]# groupadd g_group # 添加g_group组
[root@localhost quantitative-manager_agent]# usermod -a -G g_group test # 将test用户加到g_group组
[test@localhost nescadmin]$ groups
test g_group
linux用户管理常用命令
最新推荐文章于 2025-03-31 17:27:26 发布
本文介绍在Linux环境下如何进行用户及用户组的管理操作,包括创建新用户、设置用户组、修改用户所属组等常见任务。通过具体命令演示,读者可以学习如何有效地管理和维护Linux系统的用户配置。
4405

被折叠的 条评论
为什么被折叠?



