Help!

Changing UID and GID -> Some GUI problems.....

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Red Hat RSS
Next:  Accepted ifd-gempc 1.0.5-2 (source amd64)  
Author Message
Steve
External


Since: Nov 04, 2009
Posts: 1



PostPosted: Wed Nov 04, 2009 2:10 pm    Post subject: Changing UID and GID -> Some GUI problems.....
Archived from groups: alt>os>linux>redhat (more info?)

Hi,

Just a very quick question.
I have some server with each user setup.
Each user has the same UID and GID on every server.

I made a mistake on one of them
The usera has a different UID and GID -> some problems with NFS between
servers.....

I tried to change it: Let's say the userA has got the ID 500. I want to
change it for 1000

I did use :

/usr/sbin/usermod -u 1000 usera
/usr/sbin/groupmod -g 1000 usera

that works fine !!! great the user has now the UID 1000 and GID 1000....
.... excepted that when the user try to login via the GUI, he's got a lot
of errors... and cannot open the GUI ?!?!?!??!!

Any idea what else I should do ?

thanks
Back to top
Bit Twister
External


Since: Dec 19, 2004
Posts: 1894



PostPosted: Wed Nov 04, 2009 3:10 pm    Post subject: Re: Changing UID and GID -> Some GUI problems..... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 04 Nov 2009 18:37:33 GMT, Steve wrote:
> Hi,
>
> I made a mistake on one of them
> The usera has a different UID and GID -> some problems with NFS between
> servers.....
>
> I tried to change it: Let's say the userA has got the ID 500. I want to
> change it for 1000

> that works fine !!! great the user has now the UID 1000 and GID 1000....
> ... excepted that when the user try to login via the GUI, he's got a lot
> of errors... and cannot open the GUI ?!?!?!??!!
>
> Any idea what else I should do ?

Verify/change any of his files with a UID/GID of 500 to 1000 using chown.
Back to top
Moe Trin
External


Since: Aug 12, 2004
Posts: 1732



PostPosted: Wed Nov 04, 2009 9:47 pm    Post subject: Re: Changing UID and GID -> Some GUI problems..... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 04 Nov 2009, in the Usenet newsgroup alt.os.linux.redhat, in article
<4af1c9ed$0$26597$426a34cc@news.free.fr>, Steve wrote:

>I have some server with each user setup.
>Each user has the same UID and GID on every server.

>I made a mistake on one of them
>The usera has a different UID and GID -> some problems with NFS between
>servers.....

>I tried to change it: Let's say the userA has got the ID 500. I want to
>change it for 1000

>I did use :

>/usr/sbin/usermod -u 1000 usera
>/usr/sbin/groupmod -g 1000 usera

>that works fine !!! great the user has now the UID 1000 and GID 1000....

But quoting from the two man pages:

The usermod command modifies the system account files to reflect
the changes that are specified on the command line.

The groupmod command modifies the definition of the specified
GROUP by modifying the appropriate entry in the group database.

so it's fixing things in /etc/passwd /etc/group (and the appropriate
shadow files). But what is it doing to the user's files?

OK, you say UID 500 and GID 500 and they should be 1000.

find /home /var -user 500 -exec ls -ld {} \;

find /home /var -gid 500 -exec ls -ld {} \;

Note that I'm only looking in /home (home directories) and /var (mail
directories) - but you may also want to look in /mnt as well.

Now you _can_ probably fix this by changing the above commands to

find /home /var -user 500 -exec chown 1000 {} \;

or even '-exec chown 1000:1000 {} \;' if UID 1000 only owns files
and directories as GID 1000. There is also a 'chgrp' command - see
the man page for both commands. But verify that the '-exec ls -ld'
command is showing the "right" files/directories first!

After you are done, you may want to check for 'orphan' files on the
system. The command

find / \( -nouser -o -nogroup \) -exec ls -ld {} \;

should find files/directories/what-ever that are owned by a UID or GID
not in the system passwd/group files.

Old guy
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Red Hat All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum