Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
How to alter system-wide $PATH for non-interactive, non-login bash shells invoked via sshd?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to alter system-wide $PATH for non-interactive, non-login bash shells invoked via sshd?



Hi all,

I've recently begun administering a Mac OS X Server 10.5.3 Leopard server used, in part, for my company's developers. We use a couple of tools (i.e., git, a version control system) that typically invoke non- interactive, non-login shells to do stuff. However, I discovered that when a user logs in via one of these tools, which in turn invokes SSH, the bash shell that user uses has a very minimal $PATH set. Thus, my question:

Is there some place on Mac OS X Server to alter a non-interactive, non- login bash shell's $PATH in a system-wide way? The only solutions I've come across are all per-user solutions (e.g., ~/.bashrc or ~/.profile, ~/.ssh/environment, and so on).

I went so far as to try to add a new file with paths inside of /etc/ paths.d for path_helper(8) to pick up, but again this only works for login or interactive shells. Neither the OpenSSH or bash man pages are helpful here. I also found this link, which describes my issue exactly but again results in a per-user solution.

http://www.nimblemachines.com/show/DebuggingSshAndBash

I am hearing from some people on IRC that the best solution is to use Linux-PAM's pam_env, but I can't find this anywhere on my (default) Mac OS X Server, and anyway I've got almost zero experience with PAM. I'm not-so-secretly hoping that there is a plist file somewhere I can alter that will add custom directories to bash's $PATH in non- interactive, non-login shells.

Thanks in advance for any pointers you can provide.
-Meitar Moscovitz

P.S. Yes, I know I can always symlink the commands I need from /usr/ bin, but I'd rather not pollute this directory if I don't have to.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.