1

I have the following problem:

My home directory lies on the network and is mounted locally on home/<my username>.
I can access it with my normal user account <my username>, but as root, I cannot.

I do know about this question: https://serverfault.com/questions/571073/root-cannot-access-users-home-folder-shared-via-nfs

However, this, from my limited understanding of linux systems etc., seems to be some server-side-solution, if it's even applicable in this case.

But I need a client-side solution, since the admins won't change this for the time being.

So I was wondering if there was some sort of option to make the superuser automatically act like user <my username> inside the sub-directory-tree /home/<my username>, whenever the superuser needs access there.
As of now, the superuser can't even cd into my home directory.

Please note, the solution should work for sudo and in case I choose to sudo su.

2
  • That's root_squash at work, alright, so it is applicable. I take it you can't change the permissions for the paths leading to your home directory?
    – muru
    Oct 1, 2015 at 18:13
  • nope... not my turf ;( Oct 1, 2015 at 23:26

1 Answer 1

0

You can change users using su like follows:

root@bacon [~]# whoami
root
root@bacon [~]# su - cataline
cataline@bacon [/root]# whoami
cataline

May need to use sudo to run the command depending on permissions.

EDIT Changed command to reflect creating a login shell

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .