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
> 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.
>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