--- LinuxLingam <[EMAIL PROTECTED]> wrote:

you are right! i changed the UID and GID of the LL home directory on the
mounted partition to match those of the LL user on the booted partition
and distro . . . and it worked.

ofcourse, when i then booted into Redhat8's partition, and tried logging
in, the XDM screen was again hurled at me as the UID and GID of the
existing user had been changed by fedora. so this time, i logged in as
root under redhat8, reset the UID and GID, and again managed to log in
successfully as LL.

therefore, what i need to do is simple:
set up a script on fedora that,
*only* when i log in as user LL:

1) on logging-in, sets the UID and GID of the mounted partition to match
those of LL of fedora.

2) on logging-out, resets the UID and GID of the mounted partition to
match those of LL of Redhat8.


so how do i do this? i can write two scripts, but where do i put them?
as the scripts will be run by the action of the user LL logging in, a
command like chown would require a root to do that for the other home
directory, so how do i do this in the script?

do i enter these scripts in rc.local? would want this change to happen
irrespective of whether LL logs into runlevel 1, 2, 3, 4, or 5?

please help

:-)
LL

You can write a script, but a much simpler solution will be this:
See linux doesn't concerns itself with the login of the user it is there  only for 
display. Linux works with uid (which is a number). So you just have to make sure that 
this number is same in both the distributions. For this you can edit /etc/passwd of 
any of the distribution. You can equivacantly use usermod command (read man usermod). 
Also home directory access is provided by this same number. So you need to change this 
number also for your home directory of the distribution you changed uid of.

Basically you need to this:
1) Boot to one of the distributions:
2) cat /etc/passwd | grep LL
           note the the first number which is uid
3) boot to other distribution and login as root
4) edit /etc/passwd and edit the corresponding entry for LL in this file so that these 
same number are used as uid
5) also check that no other entry is using this uid; if there exists such an entry 
just swap the uid's of the two; take due considerations for the home directory of the 
conflicting user if required.
6) chown -R LL /home/LL
7) logout and login as LL

done

BYE
..
--

_____________________________________________________________
Get Your Private, Free Jatt Email at http://www.jatt.com/

_______________________________________________
ilugd mailinglist -- [EMAIL PROTECTED]
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to