1755647 Members
2932 Online
108837 Solutions
New Discussion юеВ

id problems

 
Alex Green
Frequent Advisor

id problems

Hi All,

I have a small problem, which I hope someone can help me with :).

If I run the 'id' command logged in under a specific user on 10.20 and 11.00, I get the uid, gid and the groups. If I run 'id >>username<< ' under 10.20 and 11.00, I get the same result.

However, if I run 'id' on 11i I get the uid, gid and groups. But if I run 'id >>username<<, I only get uid and gid.

Does anyone know why this is and is there a patch or a fix/change to fix this.

Thanks in advance
AG
"The physicist's greatest tool is his wastebasket." - Albert Einstein.
9 REPLIES 9
Mateja Bezjak
Respected Contributor

Re: id problems

Hi Alex,

Running id on our 10.20, 11.0 or 11.11 systems produces the same output. Groups are shown. We have HPUXBase32 (11.11) installed.

If you do "cat /etc/group | grep username", do you get any results? If not, then id username won't show the groups.

Regards,
Mateja
Steven Sim Kok Leong
Honored Contributor

Re: id problems

Hi,

# uname -a
HP-UX hpi2000 B.11.20 U ia64 3268867754 unlimited-user license
# id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)
# id root
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)

Hope this helps. Regards.

Steven Sim Kok Leong
Alex Green
Frequent Advisor

Re: id problems

ok,

all our users are listed on nis, would this affect the output of id??

I have tried this on three 11i systems, two 11.00 systems and two 10.20 systems.

As root:

id and id root... is the same.

As nis user with only a primary group:

id and id user... is the same

As nis user with primary and secondary groups:

id: shows UID,GID and secondary groups.

id user: only shows UID and GID.


Any clues.

Thanks again
"The physicist's greatest tool is his wastebasket." - Albert Einstein.
Olav Baadsvik
Esteemed Contributor

Re: id problems


Hi,

Check if you have /etc/logingroup
If you do not have it, create it like this:

ln -s /etc/logingroup /etc/group

See man logingroup

Regards
Olav
harry d brown jr
Honored Contributor

Re: id problems

Alex,

YES, NIS will change the results of "id".

IE:

$ id root
uid=0(root) gid=3(sys) groups=105(dev)
$ id hbrown
uid=4058(hbrown) gid=105(dev)
$


Note that "root" is not NIS therefore more info is available.

live free or die
harry
Live Free or Die
Alex Green
Frequent Advisor

Re: id problems

So why, if I run id as root:

id user

do I get UID, GID and Groups, but if I run as the user:

id user

I only get, UID and GID.

This is only on 11i
"The physicist's greatest tool is his wastebasket." - Albert Einstein.
Ken Mueller
Advisor

Re: id problems

I have created another group,"it", for my account. I got following.

# id jchang
uid=7067(jchang) gid=108(discus)

Why I can not see the "groups" info?
Thank you for your help.
Mic V.
Esteemed Contributor

Re: id problems

Ken,

Would you mind creating a new thread (question) out of your inquiry? It's a good question, but is really different from Alex's question.

Just my $.02. :-)

Mic
What kind of a name is 'Wolverine'?
James George_1
Trusted Contributor

Re: id problems

Hi

In 11i , when you do id , it takes the group info from the first 20 lines of your /etc/group file. If you have more than 20 lines, it may not display it. change the position of your id / group in /etc/group file and see the difference.

James
forum is for techies .....heaven is for those who are born again !!