Re: fsgqa group membership?

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Sun, Jan 14, 2024 at 09:57:06PM -0500, Theodore Ts'o wrote:
> On Sun, Jan 14, 2024 at 04:42:41PM +0100, Richard Weinberger wrote:
> > It turned out that the test failed because the user "fsgqa" did not
> > have the "fsgqa" group assigned.  After rectifying this, the test
> > passed successfully.
> > 
> > But it is nowhere stated that this has to be that way.
> > 
> > README says only:
> > 6. (optional) Create fsgqa test users and groups:
> > 
> >    $ sudo useradd -m fsgqa
> >    $ sudo useradd 123456-fsgqa
> >    $ sudo useradd fsgqa2
> >    $ sudo groupadd fsgqa
> 
> The useradd program creates the /etc/passwd entry as well as the
> /etc/group entry.  Demonstration:
> 
> % kvm-xfstests shell
>     ...
> root@kvm-xfstests:~# grep foobarbaz /etc/passwd
> root@kvm-xfstests:~# grep foobarbaz /etc/group
> root@kvm-xfstests:~# useradd foobarbaz
> root@kvm-xfstests:~# grep foobarbaz /etc/passwd
> foobarbaz:x:31418:31418::/home/foobarbaz:/bin/sh
> root@kvm-xfstests:~# grep foobarbaz /etc/group
> foobarbaz:x:31418:
> 
> I don't know why that "sudo groupadd fsgqa" is in the README; it's not
> necessary, and it would cause a "group already exists" error message.
> For example:
> 
> root@kvm-xfstests:~# groupadd foobarbaz
> groupadd: group 'foobarbaz' already exists

Hi Ted,

Yes, it'll fail as this, if USERGROUPS_ENAB is "yes" in /etc/login.defs.
That steps aren't correct 100%. I'll update this part description :)

Thanks,
Zorro

> 
> I did this demonstration using on a Debian-based test appliance.  But
> it looks like Fedora's "useradd" works exactly the same way.  See the
> web page here:
> 
> https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/basic-system-configuration/Managing_Users_and_Groups/
> 
> 						- Ted
> 





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux