Web lists-archives.com

Re: problems with manual page usermod.8 and useradd.8

On Thu 22 Feb 2018 at 22:12:44 (+0100), MarkusHiereth wrote:
> Hello,
> when updating the German translations of the shadow package, I
> encountered strange things in the documentation. For example an option
> --non-unique for the commands useradd and usermod. With the first, the
> system administrator is able to force the system to create a new user
> with an ID that already exists, which is related to another user.
> One effect I would expect after using useradd with this option is that
> files and directories are owned by two persons - as the UID of a file
> indicates the owner.

Well, yes, the UID/GID is how the system keeps track of who owns what.

> Has anybody an idea about the purpose of such an option?

I'm afraid the purpose is defined by the imagination of the person
who sets it up that way. Typical for computers, people find uses.
Different login identities but sharing the same files could be one
reason. Whatever.

> >From my point of view it is necessary that the respective manual pages
> explain why one might use such an option and / or warn what a mess
> might be created with it.

The way to avoid a mess is to use adduser. useradd is for those who
know what they're doing.

> On the debian IRC channel, one comment on this problem was, Linux is a
> friendly operating system. It will not prevent users from shooting
> themselves in the foot.

That's true. But it also has the philosophy of not preventing things
just for the sake of it.