On 08/22/2011 10:26 PM, Amer wrote: > Hello. I just started using dropbear (compiled from latest source) > only recently so pardon me if this has been brought up before > > I noticed that on some distro, debian based ones mainly such as > Ubuntu, dropbear doesn't read and set environment variables like PATH > and locales. > > When I access my server via dropbear, I found out that my > locales weren't correctly set. Same with PATH. This however doesn't > happen if I log in through openssh. > > Is this a known issue?
That's not dropbear, that's your shell. Whether it reads /etc/profile or ~./.bash_profile or what are dependent on how it's invoke, the main distinction being whether it's a "login" shell or not. (Login shells initialize their full environment by running magic shell scripts behidn the scenes, like the ones listed above. Shells called to run shell scripts and such mostly don't, although actually they just read _other_ setup scripts which are usually blank or don't contain so much baggage.) Sounds like openssh is running its shells as login shells when it isn't given a command line, and dropbear isn't. Try adding -l to your shell invocation and see what happens. (go "man bash", hit forward slash, and search for "login". I note that if you're using dash, Ubuntu's Defective Annoying SHell, you're on your own. That thing was a bad idea in the first place.) Rob
