Problem with groups in 6.1

I’m having problem with assigning users to groups. I want some users to be members of different
groups thus getting access to for instance NFS-disks on other systems. This seems as a very simple
operation, but I just can’t get it to work, what am I doing wrong!?

In /etc/passwd the account is set up like this for the users

jon:x:1234:100:Jon Doe:/home/jon:/bin/sh
jack:x:1235:100:Jack Doe:/home/jack:/bin/sh

/etc/group is set up like this

user::100
thegroup::1234:jon

The users are by default members of the group ‘user’, but also supposed to be members of other
groups like ‘thegroup’.

Now if I as root creates a directory and sets the ownership to root:thegroup with full permissions
for the group (drwxrwx—), jon can still not access this directory, why???

The setgid bit has that anything to do with this?

‘id -G’ for jon only lists 100 as the group membership not 100 and 1234 as I thought it should do!?

jon can’t chown any of his files or dirs from jon:user to jon:thegroup.

Can anyone please shed some light on this?

/Mikael K.


Mikael Karlsson (MSc)
Department of Radar Sensors
Swedish Defence Research Agency E-MAIL: mikkar@foi.se
PO. Box 1165 PHONE: Int. +46 13 37 84 75
SE-581 11 Linkoping, SWEDEN FAX: Int. +46 13 37 84 88

Operating System Tech Support wrote:

“Mikael Karlsson” <> mikkar@foi.se> > wrote in message
news:> 3BD69AD1.25D110B3@foi.se> …
for the group (drwxrwx—), jon can still not access this directory,
why???

Did you completely log “jon” out and re login again?

Yes, even did a reboot…


Mikael Karlsson (MSc)
Department of Radar Sensors
Swedish Defence Research Agency E-MAIL: mikkar@foi.se
PO. Box 1165 PHONE: Int. +46 13 37 84 75
SE-581 11 Linkoping, SWEDEN FAX: Int. +46 13 37 84 88

“Mikael Karlsson” <mikkar@foi.se> wrote in message
news:3BD69AD1.25D110B3@foi.se

for the group (drwxrwx—), jon can still not access this directory,
why???

Did you completely log “jon” out and re login again?

-Adam

Mikael Karlsson wrote:

Operating System Tech Support wrote:

“Mikael Karlsson” <> mikkar@foi.se> > wrote in message
news:> 3BD69AD1.25D110B3@foi.se> …
for the group (drwxrwx—), jon can still not access this directory,
why???

Did you completely log “jon” out and re login again?

Yes, even did a reboot…

Ping!

Have also tried this as root

id -G bin

1

Should be 1 and 3 I think. However trying it for root as root

id -G root

0 3 4 5

which is OK.

What’s up here!? Am I doing something very wrong?

/Mikael K.


Mikael Karlsson (MSc)
Department of Radar Sensors
Swedish Defence Research Agency E-MAIL: mikkar@foi.se
PO. Box 1165 PHONE: Int. +46 13 37 84 75
SE-581 11 Linkoping, SWEDEN FAX: Int. +46 13 37 84 88

I have noticed this too on my RTP 6.0 Patch C system. My group file contains
the lines:

level1:x:100:level1
level2:x:101:level2,level1
level3:x:102:level3,level2,level1
level4:x:103:level4,level3,level2,level1

where level1,2,3 and 4 are user names set up by passwd.

These settings have been in /etc/group for some time and after many reboots,
the following odd behaviour is noted:

test3 #id -G level1
100 102
test3 #id -G level2
101
test3 #id -G level3
102
test3 #id -G level4
103
test3 #id level1
uid=100(level1) gid=100(level1) groups=101(level2),102(level3)

The last one is particularly bizarre considering id -G missed out 101. What
is going on?

Poseidon

The problem seems to be with phlogin when you boot directly into photon.
If you run ph from the console to start photon the group id’s are reported
correctly. Something else that works if you boot directly into photon is to
launch a terminal and type login , but this only changes the terminal
you re-logged into not any other terminals. I will submit a Problem Report
on this issue.

Barry

Mikael Karlsson <mikkar@foi.se> wrote:

Ping!

Have also tried this as root

id -G bin

1

Should be 1 and 3 I think. However trying it for root as root

id -G root

0 3 4 5

which is OK.

What’s up here!? Am I doing something very wrong?

/Mikael K.


Mikael Karlsson (MSc)
Department of Radar Sensors
Swedish Defence Research Agency E-MAIL: > mikkar@foi.se
PO. Box 1165 PHONE: Int. +46 13 37 84 75
SE-581 11 Linkoping, SWEDEN FAX: Int. +46 13 37 84 88

Thank you for looking into this!

Your suggested workaround is a little troublesome to use in the context we are working in. We have
mounted NFS-drives with different group access for easy file sharing and is using Phindows access to
the RTP-boxes.

But at least I now know what’s wrong. and I have managed to set up a temporary solution using a
“super group”. This is not a desired solution in the long run though.

/Mikael K.

Operating System for Tech Supp wrote:

The problem seems to be with phlogin when you boot directly into photon.
If you run ph from the console to start photon the group id’s are reported
correctly. Something else that works if you boot directly into photon is to
launch a terminal and type login , but this only changes the terminal
you re-logged into not any other terminals. I will submit a Problem Report
on this issue.

Barry

Mikael Karlsson <> mikkar@foi.se> > wrote:
Ping!

Have also tried this as root

id -G bin

1

Should be 1 and 3 I think. However trying it for root as root

id -G root

0 3 4 5

which is OK.

What’s up here!? Am I doing something very wrong?

/Mikael K.


Mikael Karlsson (MSc)
Department of Radar Sensors
Swedish Defence Research Agency E-MAIL: > mikkar@foi.se
PO. Box 1165 PHONE: Int. +46 13 37 84 75
SE-581 11 Linkoping, SWEDEN FAX: Int. +46 13 37 84 88


Mikael Karlsson (MSc)
Department of Radar Sensors
Swedish Defence Research Agency E-MAIL: mikkar@foi.se
PO. Box 1165 PHONE: Int. +46 13 37 84 75
SE-581 11 Linkoping, SWEDEN FAX: Int. +46 13 37 84 88

“Mikael Karlsson” <mikkar@foi.se> wrote in message
news:3BD7EBA3.1A618CF4@foi.se

Have also tried this as root

id -G bin

1

Should be 1 and 3 I think. However trying it for root as root

id -G root

0 3 4 5

which is OK.

What’s up here!? Am I doing something very wrong?

We’re investigating the issue - one thing to try is to do a login in your
shell (ie. type “login”), you should have your proper group settings.

-Adam