- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: id and groups do not show the same things when...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2009 09:06 AM
09-01-2009 09:06 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2009 09:10 AM
09-01-2009 09:10 AM
Re: id and groups do not show the same things when a userid is put
It would appear that you have TWO accounts with the same uid.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2009 09:20 AM
09-01-2009 09:20 AM
Re: id and groups do not show the same things when a userid is put
wcalqk0z[374]#cat /etc/passwd | grep 29435
toto:NvcZPcXfZgJB6:29435:4000:toto:/home/chloe/toto:/bin/csh
wcalqk0z[376]#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2009 01:48 PM
09-01-2009 01:48 PM
Re: id and groups do not show the same things when a userid is put
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2009 03:00 AM
09-02-2009 03:00 AM
Re: id and groups do not show the same things when a userid is put
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2009 03:55 AM
09-02-2009 03:55 AM
Re: id and groups do not show the same things when a userid is put
# 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2009 03:58 AM
09-02-2009 03:58 AM
Re: id and groups do not show the same things when a userid is put
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2009 04:04 AM
09-02-2009 04:04 AM
Re: id and groups do not show the same things when a userid is put
grep -E 'toto|bp29435'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2009 04:05 AM
09-02-2009 04:05 AM
Re: id and groups do not show the same things when a userid is put
# grep -E 'toto|bp29435 /etc/passwd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2009 04:06 AM
09-02-2009 04:06 AM
Re: id and groups do not show the same things when a userid is put
bp29435:M22.sfjIpoMEE:29435:4000:Dagenais Yves:/home/chloe/bp29435:/bin/csh
wcalqk0z[393]#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2009 04:13 AM
09-02-2009 04:13 AM
Re: id and groups do not show the same things when a userid is put
# id
you still can see user "toto" ?
and also issue the command ;
# logins | grep -i toto
And besides , you say you changed toto to bp29435 . Which method did you use , did you do it inside /etc/passwd ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2009 04:17 AM
09-02-2009 04:17 AM
Re: id and groups do not show the same things when a userid is put
The id always been bp29435.
toto never existed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2009 04:32 AM
09-02-2009 04:32 AM
SolutionIf /etc/logingroup exists (as a hard link to /etc/group) you will get the same long output (membership of all groups) if you type "id" and "id toto".
If the /etc/logingroup does NOT exist, "id" gives you the long output and "id toto" gives you the short output (primary group only).
My HP-UX is 11.11.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2009 11:52 PM
09-02-2009 11:52 PM
Re: id and groups do not show the same things when a userid is put
You listed two, so we were confused.
> I modify the returns of the commands id and groups
That's fine, you just need to do that consistently. :-)
As I said above, you don't get the supplementary groups if you give an user, id(1) says:
If the process has supplementary ...
This says "process", not for user.
>TTr: I checked and noticed that the /etc/logingroup file controls the output of the id command.
That used to be the case, my 11.11 system doesn't need that link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2009 02:03 AM
09-03-2009 02:03 AM