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

    From Steve@110:300/1.1 to All on Wed Nov 4 19:37:33 2009
    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

    --- MBSE BBS v0.95.5 (GNU/Linux-x86_64)
    * Origin: Guest of ProXad - France (110:300/1.1@linuxnet)
  • From Bit Twister@110:300/1.1 to All on Wed Nov 4 20:50:59 2009
    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.

    --- MBSE BBS v0.95.5 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (110:300/1.1@linuxnet)
  • From Moe Trin@1:0/0 to All on Thu Nov 5 04:47:56 2009
    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

    --- MBSE BBS v0.95.5 (GNU/Linux-x86_64)
    * Origin: The KofoBBS MBSE - telnet://fido1.kofobbs.net