- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Change PATH based on group membership
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
09-18-2002 09:07 AM
09-18-2002 09:07 AM
[ grep -q "^GRP:[:,]USRNAME[,$] /etc/groups ] && PATH=$PATH:/blah/blah/blah
Both of these seem kludgy to me.
Any better ideas floating around out there?
Thanks!
Dave (SOL in Lawrence)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 09:11 AM
09-18-2002 09:11 AM
Re: Change PATH based on group membership
You could execute different profiles but your method is easier to maintain.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 09:53 AM
09-18-2002 09:53 AM
SolutionI'm concidering using something like this in /etc/profile:
PATH=$(cat /etc/PATH)
# append paths per group membership
for g in $(id -Gn)
do
case $g in
(emc) PATH=${PATH}:/usr/symcli/bin; MANPATH=${MANPATH}:/usr/symcli/man;;
(oracle) PATH=${PATH}:/usr/oracle/bin;;
(lawson) PATH=${PATH}:/usr/lawson/bin;;
esac
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 10:24 AM
09-18-2002 10:24 AM
Re: Change PATH based on group membership
not really elegant, but simple:
Different directories containing soft-links to the codefiles permitted for each group.
Then give read/execute permission on that directory only to that group.
Finally put all these directories into $PATH (but only these).
FWIW,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2002 06:53 AM
09-19-2002 06:53 AM
Re: Change PATH based on group membership
Thanks to all for your help.