LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-01-2010, 12:31 AM   #1
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Rep: Reputation: 15
Exclamation how to chane the ownership of home directory??


Hello Friends,

I want to change the the user and group of user kumata as kumara,but not getting change by using the below command.
#chown -R kumara:kumara kumara

Getting using doesn't exist.

For reference find the below output.

[root@xyz ~]# /usr/bin/getent passwd | grep mathurr
mathurr:x:12271:12271:Mathur, Rajat X:/home/mathurr:/bin/bash
[root@xyz ~]# /usr/bin/getent passwd | grep kumara
kumara:x:12102:12102:Kumar, Abhishek X:/home/kumara:/bin/bash
[root@xyz ~]# ls -l /home
total 20
drwx------ 2 7986 7987 4096 Sep 27 12:07 kumara
drwx------ 2 massonv massonv 4096 Sep 29 16:05 massonv
drwx------ 2 7988 7989 4096 Sep 27 12:05 mathurr


Thanks-
Shankar
 
Old 10-01-2010, 12:43 AM   #2
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 38
Take a look at "usermod".
You need to log out to change user.
 
Old 10-01-2010, 12:47 AM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
It would be better if you could show the exact output from chown. However, I suspect the problem may be that the group kumara doesn't exist. Can you confirm this?

Eg.
Code:
/usr/bin/getent group | grep ^kumara

Evo2.
 
Old 10-01-2010, 01:03 AM   #4
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Yes the kumara group doen't exist. But also the massonv group is not there. I want the kumara same as massonv.

[root@xyz ~]# su - kumara
su: warning: cannot change directory to /home/kumara: Permission denied
-bash: /home/kumara/.bash_profile: Permission denied
-bash-3.2$
 
Old 10-01-2010, 01:24 AM   #5
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
Quote:
Originally Posted by JATA01 View Post
Yes the kumara group doen't exist. But also the massonv group is not there.
Code:
getent group | egrep '^kumara|^massonv'
Quote:
Originally Posted by JATA01 View Post
I want the kumara same as massonv.

[root@xyz ~]# su - kumara
su: warning: cannot change directory to /home/kumara: Permission denied
-bash: /home/kumara/.bash_profile: Permission denied
-bash-3.2$
Code:
# chown -R kumara /home/kumara
 
Old 10-01-2010, 02:01 AM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
So, did you create the groups and check/fix the directory permissions and ownerships? Ie is this now solved?

Evo2.
 
Old 10-01-2010, 07:11 AM   #7
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Yes, now the user can login.

But can't upload file from their desktop to /var/www/ location.
Actually sudo is implemented. They will first upload to their home dir. then from that location to desired location. But its time consuming.
Is there any other way to do this??
 
Old 10-02-2010, 06:40 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Upload? scp?

Make /var/www/location writable by some group and put the users in that group.

Evo2.
 
Old 10-04-2010, 12:24 AM   #9
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Actually AD integradtion is used for the users.
So when we try to add user in created group locally, getting user already exist and gets conflicting error.

Means we can't create/add group and users on locally?
 
Old 10-04-2010, 12:27 AM   #10
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by JATA01 View Post
Actually AD integradtion is used for the users.
Sorry, I have no idea what "AD integradtion" is.

Evo2.
 
Old 10-04-2010, 01:08 AM   #11
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
AD is "Active Directory".
 
  


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
Ownership change on /home/michael mlangdn Slackware 6 08-29-2009 06:15 PM
Ownership Q for two home users cbjhawks Linux - Newbie 5 07-15-2009 05:43 PM
contents of 'home' directory found at sda5: mounted as /home, and also on sda6:/home leswatson Linux - Newbie 4 04-18-2008 04:02 PM
Chane IP in KDE? Hitboxx Linux - General 11 02-22-2007 07:21 PM
Restoring Home Directory Ownership taylortbb Linux - General 1 08-27-2004 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:53 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