Hi,
I have been using BusyBox's 'su' that comes with TinyCore.
So, when I 'sudo su' in '/home/tc', I become 'root' in '/root' directory.
tc@box:~$ sudo su
root@box:~#
Let's suppose that I'm a 'root' user, but a 'tc' user is a different person.
Then, I have no business using the 'tc' user's account or shell environment.
So, the "default" behavior of 'sudo su' on TinyCore makes sense.
However in my case, I am the 'root' and 'tc' user. I am the only person using my computer.
Also, being able to use the 'tc' user's configuration files as 'root' is very practical.
Therefore, I would like to have choices of using the "default" behavior or
sharing the 'tc' user's shell account and its environment.
My solution is to replace BusyBox's 'su' with 'su' from GNU Coreutils.
** Warning: This will install 'su' on your TinyCore temporally. **
24a7ab466c9b448203b9b2f7be944c4d tinycore_1.0rc8.iso
0e718639040e05ca7a3822f1a7d1163e compiletc.tce
tc@box:~$ tce-load compiletc.tce
94e5558ee2a65723d4840bfde2d323f0 coreutils-5.0.tar.bz2
tc@box:~$ tar -xvjf coreutils-5.0.tar.bz2
tc@box:~$ cd coreutils-5.0
tc@box:~/coreutils-5.0$ ./configure
tc@box:~/coreutils-5.0$ make
tc@box:~/coreutils-5.0$ sudo cp src/su /bin
tc@box:~/coreutils-5.0$ exit
Now, when I 'sudo su' in '/home/tc', I become 'root' and stay in the same directory.
However, the 'tc' user's shell account and its environment are not kept.
tc@box:~$ sudo su
root@box:/home/tc#
When I want to share the environment, I use 'sudo su -m' or 'sudo su -p'.
I hope this works for you too.