1

I'm sure this is something simple, but I can't for the life of me figure out what is going on.

We are using NIS (haven't had a chance to migrate to LDAP) and for some reason the groups aren't being displayed correctly.

[scott.adair@tor-admin01 ~]$ groups
pfa-admin

But when I search based on my username, it returns correctly

[scott.adair@tor-admin01 ~]$ groups scott.adair
scott.adair : pfa-admin it-admin

This is the same for the id command as well. This seems to work fine for local users (root), but not for any of my NIS accounts.

I can use the newgrp command to switch to the it-admin group, but that seems like a bit of hack.

Any ideas?

3
  • 1
    what does 'id' command show? both groups or only one?
    – Cougar
    Commented Dec 12, 2011 at 12:05
  • Shows only one, unless I specify the username then it shows both.
    – ScottAdair
    Commented Dec 13, 2011 at 0:59
  • 1
    Have you logged out and logged in after you added new groups? id+username takes these groups from /etc/group or NIS but just id gives you the current groups that were added when you logged in.
    – Cougar
    Commented Dec 15, 2011 at 19:07

1 Answer 1

0

I updated the /etc/nssiwtch.conf and changed

passwd:     compat
shadow:     compat
group:      compat

to

passwd:     files nis
shadow:     files nis
group:      files nis

Now all the groups are listed when I run the id or groups commands.

[scott.adair@tor-admin01 ~]$ id
uid=6100(scott.adair) gid=5000(pfa-admin) groups=5000(pfa-admin),5001(it-admin)

[scott.adair@tor-admin01 ~]$ groups
pfa-admin it-admin

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .