users rc file is being sourced when I do su root

arrrdh

New Member
Joined
Jul 6, 2023
Messages
6
Reaction score
0
Credits
57
so my problem is that when I am signed in as a regular user and I do su root I get this annoying message sh: 1: .: cannot open /root/aliases: No such file
this is because in my users rc file I have . $HOME/aliases
so when I switch to root, it still tries to source my users rc file which I think is stupid.
and the default shell of my root account is sh. So if I am logged in as root and then I switch to another shell for example by typing ksh it will say
ksh: /home/user/.rc[1]: .: /root/aliases: No such file or directory
 



Members online


Top