Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11797
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: "su -m" (on Mac) preserves $HOME and $USER but not ~ |
| Date | 2015-10-29 16:00 -0400 |
| Message-ID | <mailman.1271.1446148841.7904.bug-bash@gnu.org> (permalink) |
| References | <20151029170210.0ACA061A6C27@triton.parabon.com> |
On Thu, Oct 29, 2015 at 01:02:10PM -0400, dabe@dabe.com wrote: > Check out this copy-paste: > > Thu Oct 29 12:32:22 dabe@triton:~> su -m root -c "bash" > Password: > Thu Oct 29 12:32:26 root@triton:~# echo $HOME ... ~ > /Users/dabe ... /Users/dabe > Thu Oct 29 12:32:27 root@triton:~# echo $HOME ... ~ > /Users/dabe ... /Users/dabe > Thu Oct 29 12:32:28 root@triton:~# echo $HOME ... ~ > /Users/dabe ... /Users/dabe > Thu Oct 29 12:32:28 root@triton:~# echo $HOME ... ~ > /Users/dabe ... /var/root > Thu Oct 29 12:32:28 root@triton:~# echo $HOME ... ~ > /Users/dabe ... /var/root > > Notice how my $HOME stays the same (good) but my ~ changes > to /var/root -- and it changes AFTER I've been logged in for > a little while! <scratching head> Do you have a PROMPT_COMMAND variable? Or something unusual in your PS1 variable? (Doesn't look it from the copy/paste, but you never know.) Or do you have a DEBUG trap?
Back to gnu.bash.bug | Previous | Next | Find similar
Re: "su -m" (on Mac) preserves $HOME and $USER but not ~ Greg Wooledge <wooledg@eeg.ccf.org> - 2015-10-29 16:00 -0400
csiph-web