strange problem with sudo -u
I downloaded a firefox linux package
uncompress it and put it under my home dir
when I 'cd' into firefox and run the following command with my user account "esolve"
it works fine
but when I switch to root account, and run
Code:
sudo -u esolve ./firefox
I see the errors below, and firefox can't be opened, THEN I tried to modify the package owner: chown -R esolve:esolve firefox, the error persists and firefox still can't be opened
Code:
Error: Access was denied while trying to open files in your profile directory
if I just run it as root account, there will be errors but firefox can still be opened
I tried the same version of firefox package in another linux machine before and when I'm with root account
"sudo -u esolve ./firefox " works fine
what is wrong with this? it is strange
BTW, the user account esolve was created by useradd
maybe this is a problem? coz when I open the terminal, the default shell is /bin/sh
I have to mannually change SHELL=/bin/bash, and even if I put a .bashrc with such a line under homedir,
the .bashrc.doesn't seem to work
coz I need to use "sudo -u esolve ./firefox " in a script, otherwiser I will just switch to esolve and run ./firefox
so I hope to deal with this error