Other login group in adduser procedure


Well-Known Member

Reaction score: 11
Messages: 398

Hello guys,

when you create a user, the adduser command ask for the login group. The login group has the same name of the user by default.
Can you tell me, please, if is it possible avoid that a user is necessarily in a group ?

That is: can I make a user standalone not belonging to any group ?

Thanks !


Staff member

Reaction score: 7,088
Messages: 29,244

No, a user account must, at the very least, have a primary group.



Reaction score: 930
Messages: 1,492

On small systems, which have only a few users, and no structure of groups, there are two styles of system administration of assigning users to groups. One is to create a single group for all non-privileged users (typically called "users"), and have that as the primary group for all of them. The second is to create a group per user, so the assignment of user:group is typically adam:adam, bob:bob, and so on.

Each approach has advantages and disadvantages. The "single group" approach makes it easier for users to collaborate by sharing files directly out of their home directories, but it requires people to pay attention to file permissions and umask. The "group per user" approach is easier for unskilled users, but requires the admin to set up shared areas if users want to locally share files, and requires giving users alternate groups.

Clearly, on larger systems where there are users in distinct groups (perhaps projects), neither trivial solution will work correctly, and the creation of groups and assignment of users to groups requires design and analysis.

On a single-user system, there are typically only two users: the non-privileged account used for everyday tasks, and a root account used for system administration. There the only important thing is that the user account has a valid primary group, which better be listed in /etc/group.