Impossible to remove a user from the "users" group

  • Hi,

    My goal here is to link a user to a "guests" group so that he cannot access to some directories the internal users can.
    I have successfully added the user to the group "guests".

    I then was trying to remove a new created external user from the "users" group, and it seems not to work at all. The /etc/passwd file isn't modify too.


    Is it a bug?

    Lian Li PC-V354 with Be Quiet! fans | ASRock Rack x470D4U | AMD Ryzen 5 3600 | 1xCrucial 16GB DDR4 2666MHz ECC
    1xADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads | 4xWD 10To HDD in RAID 6 for Datas
    Powered by OMV v5.5.11 / Linux kernel 5.7.0

  • I then was trying to remove a new created external user from the "users" group, and it seems not to work at all. The /etc/passwd file isn't modify too.


    Is it a bug?

    No, this is by design. You will have to remove the user from the group using the command line (or create the user from the command line). OMV depends on the user being a member of the users group when setting permissions.


    What is your use case for the user not being in the users group?

    omv 5.5.13 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • My main goal is to have :
    - familly users that can read/write on all folders.
    - external (guests) users that can only read in some folders.


    All the external users can access the NAS with SFTP to download files from musics and videos.



    With those rights, only the users in the "users" group can read and write.


    At the moment, I just change the default group of the external users in /etc/passwd to match /etc/group.

    Code
    sbocquet:x:1000:100:Stéphane BOCQUET:/home/vbocquet:/usr/sbin/nologin
    utest:x:1002:1000:User test:/home/utest:/bin/sh
    Code
    guests:x:1000:utest


    Maybe there's a better way.

    Lian Li PC-V354 with Be Quiet! fans | ASRock Rack x470D4U | AMD Ryzen 5 3600 | 1xCrucial 16GB DDR4 2666MHz ECC
    1xADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads | 4xWD 10To HDD in RAID 6 for Datas
    Powered by OMV v5.5.11 / Linux kernel 5.7.0

  • Maybe there's a better way.

    If you create users from the command line for your read-only guests, they will be put in a group that matches the username and will not be in users.

    useradd -m -s /bin/sh utest1

    omv 5.5.13 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Yes.

    But I also want them to be in the same group in order that they can all read/write in some other directory.
    Well, I guest that not a big deal but I wanted to do it all in the GUI and not be forced to use CLI.


    No problemo... but maybe this can be thinked to be done in a future update ;)

    Lian Li PC-V354 with Be Quiet! fans | ASRock Rack x470D4U | AMD Ryzen 5 3600 | 1xCrucial 16GB DDR4 2666MHz ECC
    1xADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads | 4xWD 10To HDD in RAID 6 for Datas
    Powered by OMV v5.5.11 / Linux kernel 5.7.0

  • Until there could be potentially multiple "user" groups, I would guess ACLs (hate saying that since I hate them) would work for you.

    omv 5.5.13 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I hate ACLs too ;)
    Never used them... as it's always too complicated once they are set :D


    Have a nice day

    Lian Li PC-V354 with Be Quiet! fans | ASRock Rack x470D4U | AMD Ryzen 5 3600 | 1xCrucial 16GB DDR4 2666MHz ECC
    1xADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads | 4xWD 10To HDD in RAID 6 for Datas
    Powered by OMV v5.5.11 / Linux kernel 5.7.0

  • sbocquet

    Added the Label resolved

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!