|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|
|||
ksh doesn't reed root's .profile
Anyone has a clue? If i use "su - root", i have all aliases in /root/.profile working. If i use "su", /root/.profile doesn't seem to be read by ksh. What's the solution? Typing "su - root" every time is annoying.
|
|
|||
Just read it, but haven't found a solution. I've also noted when i use "su" i'm keeping my environment partly. E.g. exported variables like PKG_PATH or CVSROOT are preserved, but aliases ar not. I'm confused.
|
|
|||
And also variable PATH is not preserved (/usr/local/sbin particularly). Is this really intented behaviour? Some variables ar kept and some are not.
|
|
||||
You might consider a couple of additional man pages:
From su(1): Quote:
Quote:
|
|
||||
Solution to what? You haven't been clear about what you *expect* to have happen, and how that differs from what you're observing.
I'm hazarding a guess here...a very quick and dirty workaround (if I'm understanding your complaint correctly) would be to alias su="su -", then source your alias file at the bottom of your .profile. |
|
|||
That's correct, you've understood my complaint correctly enough. I've reread su(1) manpage and found bit more acceptable "solution" to alias su='su -m'. Thanks for answers!
|
|
|||
How? I presume su -l could be a security risk, but not su -m... :/
|
|
||||
Quote:
log as su - and do NOT read .profile is NOT a security risk. Just think about it for a second. |
|
|||
Quote:
Quote:
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenBSD: modify .profile for PS1 and PAGER | J65nko | Guides | 1 | 20th January 2010 12:17 AM |
when and by what is .profile read? | kasse | FreeBSD General | 8 | 11th September 2008 08:46 AM |
working with .profile and history | uptonm | OpenBSD Security | 1 | 15th August 2008 12:14 PM |
Firefox profile not saving | tonywob | FreeBSD General | 4 | 20th May 2008 12:20 PM |