Share this on (or read 6 comments/add one below):

6 comment

  1. I added a user to a group, and then I type the groups command, but the addition doesn’t show up in that list. When I look at the groups file, the user name is in fact listed under that group. Any ideas as to why that would be?

  2. ‘gentent group username’ does not show the primary group. It shows the group entry in the group database. You’d have to check ‘getent passwd username’ to cross-reference.


    [root@rugxacxapelo home]# getent group user100
    user100:x:1001:
    [root@rugxacxapelo home]# getent passwd user100
    user100:x:1001:1002::/home/user100:/bin/bash
    [root@rugxacxapelo home]# id -gn user100
    user200

    Have a question? Post it on our forum!