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

login, path and ~/.profile



Hi,

i was looking to change the prompt of a UML and while i was at it i noticed something in regards to the path that is set.
When logging in these files are processed (used echo to find out)
/etc/profile
/etc/bash.bashrc
~/.bash_profile
~/.bashrc

This might differ on your system as I:
* source /etc/bash.bashrc from /etc/profile
* source ~/.bashrc from ~/.bash_profile

When doing su, these files are executed
/etc/bash.bashrc
~/.bashrc

As for my questions:
1. Why isn't ~/.profile run?
2. I'm setting up an UML that i debootstrapped so root is the only way to log on for the moment. When i apt-get i get errors in the end because the /bin /sbin paths aren't set so certain tools aren't found. Is it better to leave the path like this security wise or should i just add the /bin and /sbin directories? The ~/.profile file contains a decent PATH but as this file doesn't seem to get executed, the path isn't set.

On a side note: i found out this way that su sets a path and that it can be customized with ENV_PATH and ENV_SUPATH definitions in /etc/login.defs

Thanks
Benedict



Reply to: