LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-13-2009, 08:27 AM   #1
cbjhawks
Member
 
Registered: Oct 2001
Location: Overland Park, KS
Distribution: Kubuntu 22.04
Posts: 375

Rep: Reputation: 30
Ownership Q for two home users


Just reinstalled OpenSuse 11.0 my user 'dad' works fine but for my two
daughters all is not well. First their home directory is owned by the other...ie Amanda is owned by Caitlin and vice verus. When either tries to log in three messages boxes pop up. 1) you do not have write permission to /home/whomever. 2) something called 'dcop is not running, make sure the service is started'. 3) kmserver??? 'cannot be found'

When I go into Yast I can see the ownership problem but even as the root user I'm unable to switch the two owners. Note: when I created the two user's I used a capital letter for their username (ie...Amanda verus amanda) and I got a message box that said this wasnt a good thing to do because the system mail was case senistive....I ignored the message for both girls because I did see any need for them to receive system mail. Their home directories are /home/Amanda and /home/Caitlin so I thought it would be a good idea to match /home with username....apparently not.

So how do I fix this? Delete both users and try again with lower case letters? Would the chown command/program work here from a terminal? Please advise and thanks for your input!
 
Old 07-13-2009, 08:45 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
As root, look at the contents of /home/ and their home directories.

sudo ls -ld /home/*

ls -ld /home/Amanda
ls -ld /home/Kaitlin

I don't follow what you did to get this problem. I'm wondering if you simply renamed the names of the directories in home.

If the directory /home/Amanda is owned by Kaitlin and the contents as well (and vice versa for Kaitlin) then a quick fix is to simply change the names of the directories. A user's UID and home directory are stored in the /etc/passwd file.

cd /home
sudo mv /home/Kaitlin /home/Kaitlin-old
sudo mv /home/Amanda /home/Kaitlin
sudo mv /home/Kaitlin-old /home/amanda
 
Old 07-13-2009, 11:54 AM   #3
cbjhawks
Member
 
Registered: Oct 2001
Location: Overland Park, KS
Distribution: Kubuntu 22.04
Posts: 375

Original Poster
Rep: Reputation: 30
jschiwal....thanks for your reply

The contents of Amanda and Caitlin belong to them...but the permission to access each home directory belongs to the other....ie, the info/data in /home/Amanda belongs to Amanda but the user/group=Caitlin/users....???

I follow your logic with the mv cmd/prg....seems like the easiest. thanks

Last edited by cbjhawks; 07-13-2009 at 11:56 AM.
 
Old 07-13-2009, 12:07 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
If the contents are correct, but the permissions wrong, then maybe just correct the permissions (as root).

Try:
Code:
chown amanda:users /home/amanda
chown caitlin:users /home/caitlin
Then see how it works.

I think it is unlikely (unless you have already been copying things about) that the contents of those directories have acquired incorrect permissions.

However did you get into this mess?
 
Old 07-13-2009, 12:12 PM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
However did you get into this mess?
I think I know.
You just "reinstalled".

Then you added the users caitlin and amanda in the reverse order from your previous install.

So their UIDs (incremented by one as you add each user) are reversed.

User names are mapped from the (numerical) UID.

So they are back-to front.

"Dad" is OK as he added himself first.

If you haven't changed anything yet, you can fix all this up just by editing /etc/passwd

Hope I'm not too late with this advice.
 
Old 07-15-2009, 05:43 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If the Ownership & Permissions of /home/Amanda/ and it's contents are for caitlin, then the last post by tredegar is what will fix it.
Make a backup of /etc/passwd before editing. That way if you make a typo, you can copy over /etc/passwd with the backup to restore it, and start over.
sudo cp /etc/passwd /etc/passwd-bu
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chown for changing multiple users' ownership Abhishek87 Linux - Networking 1 08-06-2007 12:53 PM
Users saving but not taking ownership deadtech Other *NIX 4 12-06-2005 10:49 AM
Restoring Home Directory Ownership taylortbb Linux - General 1 08-27-2004 09:40 AM
Something is Changing ownership for /home/user/.ICEauthority biscuitheadgrav Red Hat 1 10-08-2003 01:55 AM
changing users and group ownership dkc_ace Linux - General 4 02-03-2003 07:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration