1834757 Members
3274 Online
110070 Solutions
New Discussion

Re: root's PATH

 
SOLVED
Go to solution
James Armstrong
Advisor

root's PATH

Hi,

We have just be externally audited and one of teh recommendations is that we reduce root's path to just /usr/sbin:/sbin:/usr/bin to avoid the risk of trojans etc. I am a bit twitchy about doing this, ,has anyone got a recommendation for a minimum root path that still allows some flexibility for running most day to day commands without entering teh full path.
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: root's PATH

Hi James,

The auditor's recommendation would be fine if you have no need to access other installed applications. However, if you have other applications (like Omniback, or your DB, for example), you may want to include those in your path. It really depends on how (and for what) you use root access.


Pete

Pete
Stefan Farrelly
Honored Contributor
Solution

Re: root's PATH

I would be very loathe to go against the minumum PATH as in /usr/newconfig/etc/PATH
/usr/bin:/usr/ccs/bin:/usr/contrib/bin
without strenuous testing to see the implications.

Ive been through many many security audits over the year - one just last week by AOL/Time Warners top security people, and they never recommended changing roots default path - which is good enough for me. I think its unnecessary.

Im from Palmerston North, New Zealand, but somehow ended up in London...
James R. Ferguson
Acclaimed Contributor

Re: root's PATH

Hi James:

This isn't bad. Consider that the default environment supplied by 'cron' for its jobs is '/usr/bin:/usr/sbin:', so the above covers the standard OS commands nicely.

Regards!

...JRF...
James Armstrong
Advisor

Re: root's PATH

Thanks for that guys, I'll reduce it on one of the dev boxes for a while and see if all goes ok.
Steven E. Protter
Exalted Contributor

Re: root's PATH

The auditors recommendation is a little spartan.

You can break certain applications and scripts by being that tight. Remember in cron scripts you generally have to set the path or use full path names of commands.

Do all of your sysadmin scripts do one or the other? If not, you might be buying a little trouble.

Still your test approach is top notch. Make sure you notify your auditors and problems of any problems the recommendation causes.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John Meissner
Esteemed Contributor

Re: root's PATH

We get regular audits at work from external audit companies. They make loads of suggestions to us. We take these as SUGGESTIONS. If you run feel the need to leave things in your path statement (such as usr/contrib/bin - for gzip and gunzip) then I would leave them. They are just making suggestions which your company will need to evaluate to determine risk/benifit.
All paths lead to destiny
Tim Sanko
Trusted Contributor

Re: root's PATH

Comply with the auditors fully. Remove virtually everything from the path. In the .dtprofile or
.profile for batches have a
.my_settings file with the appropriate paths. have it sourced on non-interactive
processes.

you can source it from the command line yourself

# . /root/.my_settings

This brings you into full compliance and lets you do your job. whith a minumum of
grief