[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Changing user while being root will leave you to the root homedir.



Thanks. It worked.

Although its still strange why debian 9.8 behaves differently
when i execute su foouser as root.

On 19/3/19 11:21 π.μ., Qiming Ye wrote:
Have you tried:
   # su - chomwitt

- Qiming

On 2019-03-19 10:57+0200, aprekates wrote:
In a new debian 9.8 installation i noticed that:

root@s165:~# pwd
/root

root@s165:~# su chomwitt
chomwitt@s165:/root$

..and from there i cant even execute ls.

$ man ls
man: can't change directory to '/root': Permission denied
man: command exited with status 255: sed -e '/^[[:space:]]*$/{ N;
/^[[:space:]]*\n[[:space:]]*$/D; }' | (cd /root && LESS=-ix8RmPm Manual page
ls(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for
help or q to quit)$PM Manual page ls(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e
(END):?pB %pB\%.. (press h for help or q to quit)$ MAN_PN=ls(1) pager)


In another 9.6 , changing user will put me in the user's home dir.

Alexandros



Reply to: