To recap (and maybe explain a little better what I was asking), my original
question had to do with setting a default path for Solaris. I was hoping for a
single point to edit to give all shells the same initial path, and hence all
users the same basic path.
It appears that this is, if not impossible, at least difficult.
To summarize:
The default, or initial path can be set by /etc/default/login, but for
many reasons this seems to be an unreliable way to do things and a
generally bad idea.
One reason is that nothing else in the login process assumes a default
path, so they all try to write their own. Setting other values in that
file also don't always seem to work.
The best way to do it seems to be to edit the global sources for the
shell, those being the /etc/cshrc and /etc/profile files to reflect the
proper paths.
Another option is to edit the files in /etc/skel which get distributed to
the user directories as they get created (using the useradd with -m or the
admintool).
IMO, it seems that the best is to edit the files in /etc since it seems
that this is the best way to effect a system wide change in the paths
statements.
Many (some quoted below) suggested that editing the files in /etc/
wasn't a good idea since you would need to re-edit them upon an upgrade
or reinstall, and indicated a better way would be to source a file in a
different location.
This is probably a good idea if one is making a lot of changes, if it is
only a slight change (as is the current case w/me) then it may or may not
be worth the trouble since you will have to do just as much editing either
way.
Some specific answers I felt were worth quoting:
Todd M. Wilkinson" <tmwilkin@appliedtheory.com>:
---- Said: Well it depends on how one is access the system. If you are talking about a Sun telnet you have several options. As you know there are many methods of access the system and not all of them utilize /bin/login or /usr/sbin/in.telnetd. In our example many times we replace our normal login binaries with our own that utilize ssh, kerberos and a few other functions, thus negating a default system path. Other methods such as cgi scripts have there own method of determing a system path. For you own sake though I pulled an entry from the man page for login as shown below.<deleted> <and>
Just remember that paths and such are largely the job of the shell and thus it is hard to have one global all path giving master file that defines what your paths and settings are. ----
I have found that this is the case. I get some wierd differences in the paths between logging in w/telnet & SSH.
David Evans <DJEVANS@au.oracle.com>:
---- You are making a fundamental error when editing /etc/skel, /etc/.login,/etc/profile or any system supplied file under HP, Sun, Linux, AIX, etc... in that the next system upgrade will wipeout any changes or customizations. To get around that I have a separate directory where I put localizations into. Then when an upgrade comes along I only need to add:
For Bourne shell and derivatives: . /sysadm/default/profile
For C shell and derivatives: source /sysadm/default/login ----
I think this really depends on the degree of customization, and your projected upgrade cycle.
And something I have yet to try, but would be nice it if works properly:
jim@nga.com (Jim Roy): ---- I cant remember now whether it's a solaris thing or a csh thing, but I found out a while back that you can you use wildcards in the path declaration. eg /opt/*/bin to corral up all the stuf that gets installed that way by the solaris packages. ----
The summaries are archived on the web at:
http://www.latech.edu/sunman-search.html
Thanks also to :
Mark Hargrave <hargrme@wisdom.maf.nasa.gov> Roger D McGraw <roger@ptac.com> Rob Leonard <r.leonard@metrolink.net> Igor Schein <igor@txc.com> James Musso <jam@cdicad.com> Sean <shadow6@bellsouth.net> u-kevin@megami.veritas.com (Kevin Sheehan - Uniq) valerie@facade.cc.bellcore.com (valerie gray) Bruce R. Zimmer <bzimmer@all-phase.com> James Musso <jam@cdicad.com> Sean <shadow6@bellsouth.net> u-kevin@megami.veritas.com (Kevin Sheehan - Uniq) valerie@facade.cc.bellcore.com (valerie gray) Bruce R. Zimmer <bzimmer@all-phase.com> Brion Leary <brion@dia.state.ma.us> Kyle Pinkston NYC <kdp@pfizer.com> Thomas Lester <tlester@spain.iakom.com> Matthew Stier <Matthew.Stier@tddny.fujitsu.com> Todd Fiedler <tfiedler@muscanet.com> Mark A. Baldwin <mark.baldwin@makesys.com> foster@bial1.ucsd.edu Francisco de la Torre <ntlinux@hotmail.com> Andrew Mitchell <afm@colltech.com> Rick von Richter <rickv@mwh.com> Rich Kulawiec <rsk@gsp.org> Shriman Gurung <SG@datcon.co.uk>
This list rocks.
And finally, to answer some of the other questions that came up in various back and forth emails:
Yes, I really do work for Playboy.
petro@playboy.com----for work related issues. I don't speak for Playboy. petro@bounty.org-----for everthing else. They wouldn't like that. They REALLY Economic speech IS political speech. wouldn't like that.
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:48 CDT