1754980 Members
3107 Online
108828 Solutions
New Discussion юеВ

su

 
SOLVED
Go to solution
Chern Jian Leaw
Regular Advisor

su

HI
I've tried using the command :
#su -
to become a superuser. I do have root access to all machines.

I then tried modifying the permission settings of an active user's home directory, but it still printed :
chmod:joe :Operation not permitted

How do I overcome this problem?

Thanks
7 REPLIES 7
Tom Geudens
Honored Contributor

Re: su

Hi,
I'm not quite clear about your question
If you do a grep on /etc/passwd, your user has userid 0 ?
#who am i
returns "root" before you do the chmod ?

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
Bill McNAMARA_1
Honored Contributor

Re: su

try chown ?

ie:

chmod o+r file_or_dir
chown joe:users file_or_dir

verify your user:
after su -

id
who am i

Later,
Bill
It works for me (tm)
Steve Steel
Honored Contributor

Re: su

Hi

is it NFS

Then you need to do this on the system which owns the home directories


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Stefan Schulz
Honored Contributor

Re: su

Hi,

this sounds like this users home is on a mounted filesystem. If this is not exported with the root option to the workstation you are on you get this message.

You have to log into the machine which exports this filesystem. Do your modificatons there. Alternatively you can chane the options in /etc/exports to give root access to the workstation you are on.

Hope this helps

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Chern Jian Leaw
Regular Advisor

Re: su

Tom, Bill & Steve,

I'm actually trying change a current user's home dir permissions from 755 to 777. It's residing on NFS. I tried :
chmod o+r joe

but it still produced a "Operation not Permitted" error msg.
I do not wish to change the owner as what Bill had suggested doing by using chown joe.

I had just tried with the following, and it worked! i.e:
#rlogin machine
#sudo su

By doing sudo su, I already have superuser access to all files/dirs.

I also did:
#sudo su - joe

and entered into joe's home dir with root priviliges.

Pete Randall
Outstanding Contributor

Re: su

Root permissions do not carry well across NFS. You should always log into the machine that you want to change, physically or via rlogin.

HTH,
Pete

Pete
Bill Hassell
Honored Contributor
Solution

Re: su

You do not have root permissions on any NFS mountpoint as it would be a serious security risk. Also, 777 is a big red flag: setting 777 on any directory means that anyone can destroy the contents of that directory. My guess is that even if 777 was set on this directory by the server's administrator, it would not solve the user's problems. NFS carries a lot of restrictions and is not just a simple filesystem from another computer.

It is possible to export root permissions to your system--see man exports, but I would not recommend it.


Bill Hassell, sysadmin