- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- PATH variable on system startup
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2005 09:54 AM
05-20-2005 09:54 AM
PATH variable on system startup
I have an app trying to su but they have no path...obviously I told them to include the full path in the script, but then I got to wondering why the PATH wouldn't be broader to begin with.
Usage: /sbin/rc3.d/S799patrol {start|stop} Output from "/sbin/rc3.d/S799patrol start":
/sbin/rc3.d/S799patrol[27]: su: not found
/sbin/rc3.d/S799patrol[28]: su: not found "/sbin/rc3.d/S799patrol start" FAILED
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2005 10:50 AM
05-20-2005 10:50 AM
Re: PATH variable on system startup
Changes to /etc/PATH will be applied globally. So a user who does not need path like /xxxyyy, will also get it.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2005 11:29 AM
05-20-2005 11:29 AM
Re: PATH variable on system startup
If there is a /etc/PATH file on your system and it has some directories listed in it delimited by : (colon that is), make sure it has at least permission 444 (read for everyone). 644 or 744 is acceptable as long as the owner is root, but do not give more than read to group and others to protect it from getting fatfingered by unknowing people.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2005 01:05 PM
05-20-2005 01:05 PM
Re: PATH variable on system startup
PATH=/sbin
export PATH
Most of the processing scripts in /sbin/init.d (/sbin/rc?.d) have the following line at the beginning of the file.
PATH=/usr/sbin:/usr/bin:/sbin
export PATH
Make sure your startup script contains this file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2005 03:31 PM
05-20-2005 03:31 PM
Re: PATH variable on system startup
export PATH=/usr/bin
Then as you code additional commands, you add to your local PATH, knowing that you are in control. Some software packages go a bit too far in appending directories to /etc/PATH and you end up with a huge PATH. You can adjust your PATH for your local shell, but for startup scripts and cron and batch jobs, never assume anything about the current PATH value--and you won't go wrong.
Bill Hassell, sysadmin