Re: login, path and ~/.profile
From: Jan T. Kim (jtk_at_cmp.uea.ac.uk)
Date: 09/30/05
- Previous message: Seeker5528: "Re: GRUB woes (install to hde)"
- In reply to: Benedict Verheyen: "login, path and ~/.profile"
- Next in thread: Jan T. Kim: "Re: login, path and ~/.profile"
- Reply: Jan T. Kim: "Re: login, path and ~/.profile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Sep 2005 11:02:23 +0100 To: Debian Linux Distro Users Discussion <debian-user@lists.debian.org>
On Fri, Sep 30, 2005 at 08:50:05AM +0200, Benedict Verheyen wrote:
> 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?
The su command does not launch a login shell, and the login scripts
(/etc/profile and ~/.profile) are only executed by a login shell. That's
the difference between the two.
To get a root login shell, use
su -
> 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.
I don't have any experience with UML (and I just guess you mean "User
Mode Linux", rather than "Unified Modelling Language"), but, at any rate,
simply "su -" should get you the standard root PATH and other environment
settings.
Best regards, Jan
-- +- Jan T. Kim -------------------------------------------------------+ | *NEW* email: jtk@cmp.uea.ac.uk | | *NEW* WWW: http://www.cmp.uea.ac.uk/people/jtk | *-----=< hierarchical systems are for files, not for humans >=-----* -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
- Previous message: Seeker5528: "Re: GRUB woes (install to hde)"
- In reply to: Benedict Verheyen: "login, path and ~/.profile"
- Next in thread: Jan T. Kim: "Re: login, path and ~/.profile"
- Reply: Jan T. Kim: "Re: login, path and ~/.profile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|