Bug 92108 - Changing groups in gui does not actually properly change them
Summary: Changing groups in gui does not actually properly change them
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: python2
Version: 9
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-06-02 19:22 UTC by Neil Christensen
Modified: 2007-04-18 16:54 UTC (History)
0 users

Clone Of:
Last Closed: 2003-06-03 13:24:11 UTC

Attachments (Terms of Use)

Description Neil Christensen 2003-06-02 19:22:53 UTC
Description of problem:
  I used the Red Hat User Manager gui (under System Settings -> Users and
Groups) to change the groups of my users.  In particular, I added a new user
(without giving them an individual group) and put them in the group "physics". I
also removed him from the group "users".  I then edited my own user profile and
added the "physics" group to it, though I left the primary group as something
else.  The idea was that we would be in the same group so that we could share
some files.

  I opened a shell and entered su mode.  I then entered the /home/ directory and
changed the permissions of the users files to readable and executable for users
in the same group (chmod g+rx username).  

  I tried to use Nautilus to access his files.  It said that I did not have the
permissions necessary to access his file system.  I went back to the shell and
checked the permissions (ls -lh).  The permissions were set correctly, but the
groups were not changed.  What I found was that the new user was in group
"users" and not "physics".  And, I was in the group "physics" although my
primary group should be "christensen".

I went back to Red Hat User Manager and checked that everything was entered
correctly.  It was.  I clicked the refresh button a few times.  I closed it and
opened it again.  The Red Hat User Manager always had the groupings I intended.
 Namely, both my friend and myself in the "physics" group.  However, I was never
able to access his files and on the command line, the groups remained: my friend
in "users" and me in "physics".

Version-Release number of selected component (if applicable):Whatever comes with

How reproducible:very.  I did it again with a test account.

Steps to Reproduce:
1.Open Red Hat User Manager.  Click on Add User.  Enter test in user name, enter
password, unclick "Create a private group for the user".  Click ok.

2.Click on the new user test and click Properties.  Click the group tab.  Check
the "physics" group and uncheck the "users" group.  Click OK.  Look at the list
of users.  The test user's primary group is "physics".  All seems to be good.

3.Open shell and enter su mode.  change to home directory (cd /home/) and list
files (ls -lh) the output of the new user is:
drwx------    4 test     users        4.0K Jun  2 15:08 test

3.Perhaps "physics" isn't the primary group.  Change permissions.  (chmod g+rx
test) and list again (ls -lh):
drwxr-x---    4 test     users        4.0K Jun  2 15:08 test

4.Exit su mode and try entering test's files (cd /home/test/):
bash: cd: test: Permission denied

5.Check the Red Hat User Manager.  Hasn't changed.  It still has the intended
group information.  It just doesn't seem to be communicated to the actual linux
user definitions.

6.I learned something new when I did this "test" example.  After I was done, I
used the Red Hat User Manager to delete this new "test" user.  It dissapeared. 
I thought it was gone.  Then, I tried to list the home contents again using the
shell.  I got:
drwxr-x---    4 503      users        4.0K Jun  2 15:08 test
It's still there!

That's about it.  If you need additional information, feel free to contact me.

Comment 1 Neil Christensen 2003-06-03 13:24:11 UTC
  My sincere apologies.  It turns out that the groups of the users did change. 
The changes did show up in /etc/passwd and /etc/group.  What didn't change was
the group ownership of the files.  I didn't understand this.  I had to use chgrp
for this.  

  Also, I was mistaken about the deletion of the "test" user account.  I see now
that the the user was removed from /etc/passwd but that the file tree of "test"
was not removed.  This is most likely in case the files are important.

  Once again, I apologize.

Note You need to log in before you can comment on or make changes to this bug.