大网数据广告活动
服务器运维问答

How to create a user really without group in centos 7?

· 52CE 我爱测

Per this question ,I decide to create dummy user to be the owner of website files. Centos 7 offer default group ID 100 when I run useradd -u 508 -M -N -s /sbin/nologin dummyuser1 . I want to provide as little as possible privileg…

问题原文

原帖链接 · kittygirl · CC BY-SA 4.0

Per this question,I decide to create dummy user to be the owner of website files.

Centos 7 offer default group ID 100 when I run useradd -u 508 -M -N -s /sbin/nologin dummyuser1.
I want to provide as little as possible privilege to the dummyuser1,then I don't want dummyuser1 has group.

How to do it?

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 4.0

Remove the -N option. You need to create a private user group exclusively for this user.

All users must have a group. If you don't want the user to be in any other groups, then the user should be in its own group. By default a group with the same name as the user is created, and that group has the same name as the user.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-01-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。