[nSLUG] chown, chmod or what

Bill Davidson billdavidson at eastlink.ca
Fri Jan 5 23:09:17 AST 2007


Hi:

As I understand it, you have installed several distributions on one
computer, each in its own partition.  You have created a user "rejean"
in each distro, but unfortunately each distro's numeric user id
correspondint to "rejean" is different.  Further, each distro's "rejean"
has his own home directory.

You want to copy a file from the home directory of one "rejean" into
that of another.

> This afternoon I tried;
> chown /mnt/distroA/home/rejean

That won't work, because you didn't specify the user you are trying to
change the ownership to.  I assume you actually type something like
"chown rejean /mnt/distroA/hom/rejean", which still isn't exactly what
you wanted -- you should use the "-R" or "--recursive" switch to change
the ownership of all the files under /mnt/distroA/home/rejean.

But as you have seen, that doesn't work either, because now you have
screwed up the ownership of rejean's home directory in distroA.

There are several better approaches.

First, if this is something that you do only once in a while, just log
in as root or use "su" to copy the file, then change the ownership of
the copy.

Second, and worst, change permissions on all rejean's files to be world
readable and/or world writeable, depending on what you need to do with
those files.  This is terribly insecure, but on a single-user machine
behind a firewall it's probably not that important.

Best, why not have just one home directory for all rejean's, and make
all the distro's agree on the numeric user id for rejean (by
editing /etc/passwd)?  If you can find one more partition to use
as /home/rejean, or as /home, and adjust all your /etc/fstab's
accordingly, then it won't matter which distro you are using, rejean
will always be rejean and he will have all his files.

> 
> and now I cannot login distroA as 'rejean' only as root.
> 2 quick questions if I may;
> 1. What should I normally do in such a situation.
> 2. Is there any way to fix the problem?
> 
> Any help will be greatly appreciated.
> Rejean
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com  
> 
> _______________________________________________
> nSLUG mailing list
> nSLUG at nslug.ns.ca
> http://nslug.ns.ca/cgi-bin/mailman/listinfo/nslug
> 
> 
> !DSPAM:459ee073115803352519216!

!DSPAM:459f12df125285643621295!




More information about the nSLUG mailing list