Help me understand few things

Gupta, Sanjay SGupta@Epylon.com
Fri Apr 5 22:00:00 GMT 2002


Hello All,

Few things are not clear to me, I would appreciate, if somebody can help me
understand the concept. I have included my copy of /etc/group and
/etc/passwd file.

Q1. When I launch cygwin using shortcut on my desktop which is basically
pointing to cygwin.bat , when I issue id command, I get the following output
$ whoami
Guest

Guest@SGUPTA-LAPT ~
$ id
uid=501(Guest) gid=513(None) groups=513(None)

Now, if I do login to Guest user as ssh
$ ssh guest@sgupta-lapt
guest@sgupta-lapt's password:
Last login: Fri Apr  5 21:19:13 2002
Fanfare!!!
You are successfully logged in to this server!!!

Guest@SGUPTA-LAPT ~
$ id
uid=501(Guest) gid=513(None)
groups=0(Everyone),513(None),546(Guests),547(Power
Users),545(Users),1001(ORA_DBA)

Guest@SGUPTA-LAPT ~
$

See the difference between the id commands between the same user.  One login
was done using  shortcut on desktop and other is using ssh.
Any logic behind this ?

Q2: I have read the Documentation provided by CYGWIN but was unable to find
out where the information is kept regarding groups a user has. In Unix like
system, if suppose I have a group called staff , then you can easily see the
group staff is assigned to which users by looking /etc/group file but I was
unable to find this information in CYGWIN /etc/group . My guess is CYGWIN
basically picking this information from Windows database, only Primary Group
information is kept in /etc/passwd file and secondary groups are taken from
Windows database. It is not kept in /etc/group in CYGWIN. Is my
understanding correct ?

Q3: When logged in via ssh, if I run
$ id -Gn
None Everyone Guests Power Users Users ORA_DBA
It displays all the Primary and Secondary Groups belong to the current user.
My current user is Guest.
but when I specify
$ id -Gn Guest
None
It only displays None which is the Primary Group for Guest user but
according to id command documentation, it should display all the Secondary
groups as well.
Is there some problem with id command or my understanding is not correct,
The above gives works as expected in my Sun OS.

-----------------------------------------------
My copy of /etc/group and /etc/passwd

$ cat /etc/group
Everyone:S-1-1-0:0:
SYSTEM:S-1-5-18:18:
None:S-1-5-21-606747145-492894223-1708537768-513:513:
Administrators:S-1-5-32-544:544:
Backup Operators:S-1-5-32-551:551:
Guests:S-1-5-32-546:546:
Power Users:S-1-5-32-547:547:
Replicator:S-1-5-32-552:552:
Users:S-1-5-32-545:545:
ORA_DBA:S-1-5-21-606747145-492894223-1708537768-1001:1001:

$ cat /etc/passwd

Everyone:*:0:0:,S-1-1-0::
SYSTEM:*:18:18:,S-1-5-18::
Administrators:*:544:544:,S-1-5-32-544::
Backup Operators:*:551:551:,S-1-5-32-551::
Guests:*:546:546:,S-1-5-32-546::
Power Users:*:547:547:,S-1-5-32-547::
Replicator:*:552:552:,S-1-5-32-552::
Users:*:545:545:,S-1-5-32-545::
ORA_DBA:*:1001:1001:,S-1-5-21-606747145-492894223-1708537768-1001::
Administrator:unused_by_nt/2000/xp:500:513:U-SGUPTA-LAPT\Administrator,S-1-5
-21-
606747145-492894223-1708537768-500:/home/Administrator:/bin/bash
Guest:unused_by_nt/2000/xp:501:513:U-SGUPTA-LAPT\Guest,S-1-5-21-606747145-49
2894
223-1708537768-501:/home/Guest:/bin/bash
sgupta:unused_by_nt/2000/xp:1000:513:Sanjay,U-SGUPTA-LAPT\sgupta,S-1-5-21-60
6747
145-492894223-1708537768-1000:/home/sgupta:/bin/bash

Thanks in advance.

Sanjay Gupta



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list