Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-01-2010, 12:31 AM
|
#1
|
Member
Registered: Nov 2007
Posts: 207
Rep:
|
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
|
|
|
10-01-2010, 12:43 AM
|
#2
|
Member
Registered: Sep 2003
Distribution: Slackware
Posts: 626
Rep:
|
Take a look at "usermod".
You need to log out to change user.
|
|
|
10-01-2010, 12:47 AM
|
#3
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
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.
|
|
|
10-01-2010, 01:03 AM
|
#4
|
Member
Registered: Nov 2007
Posts: 207
Original Poster
Rep:
|
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$
|
|
|
10-01-2010, 01:24 AM
|
#5
|
Member
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724
Rep: 
|
Quote:
Originally Posted by JATA01
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
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
|
|
|
10-01-2010, 02:01 AM
|
#6
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
So, did you create the groups and check/fix the directory permissions and ownerships? Ie is this now solved?
Evo2.
|
|
|
10-01-2010, 07:11 AM
|
#7
|
Member
Registered: Nov 2007
Posts: 207
Original Poster
Rep:
|
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??
|
|
|
10-02-2010, 06:40 PM
|
#8
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Upload? scp?
Make /var/www/location writable by some group and put the users in that group.
Evo2.
|
|
|
10-04-2010, 12:24 AM
|
#9
|
Member
Registered: Nov 2007
Posts: 207
Original Poster
Rep:
|
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?
|
|
|
10-04-2010, 12:27 AM
|
#10
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Quote:
Originally Posted by JATA01
Actually AD integradtion is used for the users.
|
Sorry, I have no idea what "AD integradtion" is.
Evo2.
|
|
|
10-04-2010, 01:08 AM
|
#11
|
Member
Registered: Nov 2007
Posts: 207
Original Poster
Rep:
|
AD is "Active Directory".
|
|
|
All times are GMT -5. The time now is 11:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|