Operating System - HP-UX
1753604 Members
5940 Online
108797 Solutions
New Discussion юеВ

Re: id and groups do not show the same things when a userid is put

 
SOLVED
Go to solution
Catherine Forget
Frequent Advisor

id and groups do not show the same things when a userid is put

Hi,
Could someone explain to me why the command "id" and "id toto" does not return the same thing when I am logged with the userid 'toto'?
I have the same problem with the command groups.
I am using a local /etc/group and it does contain less than 2048 characters per groups.

i.e.:
wcalqk0z[7]: id
uid=29435(toto) gid=4000(mfgext) groups=34000(A000ext28),34011(A011ext2),34003(A003ext27),34005(A005ext24),34004(A004ext24),4300(tldnext),4140(mtrain),4008(mswd),4006(msmext2ext3),4003(mpl2ext),44441(minnet),4001(mdevext),4144(bpd4144)
wcalqk0z[8]: id bp29435
uid=29435(bp29435) gid=4000(mfgext)

Any idea what can be done so the results is the same?
Thanks in advanced,

Cat.
14 REPLIES 14
James R. Ferguson
Acclaimed Contributor

Re: id and groups do not show the same things when a userid is put

Hi Cat:

It would appear that you have TWO accounts with the same uid.

Regards!

...JRF...
Catherine Forget
Frequent Advisor

Re: id and groups do not show the same things when a userid is put

Nop! I have only one :
wcalqk0z[374]#cat /etc/passwd | grep 29435
toto:NvcZPcXfZgJB6:29435:4000:toto:/home/chloe/toto:/bin/csh
wcalqk0z[376]#
Dennis Handly
Acclaimed Contributor

Re: id and groups do not show the same things when a userid is put

>what can be done so the results is the same?

You have to be root to get the supplementary groups.

>JRF: It would appear that you have TWO accounts with the same uid.

Sure looks like it.

>I have only one:

What does this show:
grep bp29435 /etc/passwd

Why did you use id(1) on that user? Did you recently delete it?
Catherine Forget
Frequent Advisor

Re: id and groups do not show the same things when a userid is put

Hi Dennis,

There is still only one id:
wcalqk0z[390]#grep bp29435 /etc/passwd
bp29435:M22.sfjIpoMEE:29435:4000:toto:/home/chloe/bp29435:/bin/csh
wcalqk0z[391]#

One of my customer runs both command on the userid trying to log to an application.

Actually, the commands works fine in the prod environment when the /etc/group file contains all the groups (no ldap lookup). I am not root to run it.
In the Lab environment, using nis, I added all the groups in /etc/group instead of a '+' as usual but it does not returns the same results than in prod.
Robert-Jan Goossens_1
Honored Contributor

Re: id and groups do not show the same things when a userid is put

Hi Catherine,

# grep 29435 /etc/passwd

It looks like both accounts have the same uid.

toto:NvcZPcXfZgJB6:29435:4000:toto:/home/chloe/toto:/bin/csh
bp29435:M22.sfjIpoMEE:29435:4000:toto:/home/chloe/bp29435:/bin/csh


Regards,
Robert-Jan
Catherine Forget
Frequent Advisor

Re: id and groups do not show the same things when a userid is put

Hi, There is only one account.
I changed bp29435 to toto at the beginning because I did not want to put the real id, but Dennis asked for grep bp29435 (which is the real id of the user).
Hakki Aydin Ucar
Honored Contributor

Re: id and groups do not show the same things when a userid is put

try this one, and post output :

grep -E 'toto|bp29435'
Hakki Aydin Ucar
Honored Contributor

Re: id and groups do not show the same things when a userid is put

sorry i previous was typo: issue this command:

# grep -E 'toto|bp29435 /etc/passwd
Catherine Forget
Frequent Advisor

Re: id and groups do not show the same things when a userid is put

wcalqk0z[392]#grep -E 'toto|bp29435' /etc/passwd
bp29435:M22.sfjIpoMEE:29435:4000:Dagenais Yves:/home/chloe/bp29435:/bin/csh
wcalqk0z[393]#