SUMMARY (Final) Setting default paths on Solaris 2.6

From: Petro (
Date: Fri Sep 11 1998 - 14:31:53 CDT

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

     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

     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

Some specific answers I felt were worth quoting:

Todd M. Wilkinson" <>:

     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 <>:

---- 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 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:

Thanks also to :

Mark Hargrave <> Roger D McGraw <> Rob Leonard <> Igor Schein <> James Musso <> Sean <> (Kevin Sheehan - Uniq) (valerie gray) Bruce R. Zimmer <> James Musso <> Sean <> (Kevin Sheehan - Uniq) (valerie gray) Bruce R. Zimmer <> Brion Leary <> Kyle Pinkston NYC <> Thomas Lester <> Matthew Stier <> Todd Fiedler <> Mark A. Baldwin <> Francisco de la Torre <> Andrew Mitchell <> Rick von Richter <> Rich Kulawiec <> Shriman Gurung <>

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. work related issues. I don't speak for Playboy. 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