- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: shell trick? ( how to enable ENV file processi...
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
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-24-2003 08:10 AM
09-24-2003 08:10 AM
shell trick? ( how to enable ENV file processing in suid script?)
Is there a way for ksh to make it ignore privileged mode? I have a suid script which has 3 lines:
#!/bin/ksh
export ENV=/home/user/env
exec ksh
and of course ksh senses that uid != ruid and sets privileged mode automatically. There seem to be nothing in the man pages which can force ksh to process ENV file.
Any suggestions?
Thanks,
Sergey.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2003 09:22 AM
09-24-2003 09:22 AM
Re: shell trick? ( how to enable ENV file processing in suid script?)
We get around most of the hassle of environment by including those variables necessary with the script being executed.
Doesn't exactly answer your question bu it is a solution that works for us.
Best of luck.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2003 09:24 AM
09-24-2003 09:24 AM
Re: shell trick? ( how to enable ENV file processing in suid script?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2003 05:32 PM
09-24-2003 05:32 PM
Re: shell trick? ( how to enable ENV file processing in suid script?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2003 12:25 AM
09-25-2003 12:25 AM
Re: shell trick? ( how to enable ENV file processing in suid script?)
It works for me.
My Script looks like this
#!/bin/ksh
ENV=$HOME/alias.file
export ENV
exec ksh
alias.file must have read-permissions !!
HTH
Roland
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2003 12:27 AM
09-25-2003 12:27 AM
Re: shell trick? ( how to enable ENV file processing in suid script?)
ENV=/.kshrc
Aliases work.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2003 01:56 AM
09-25-2003 01:56 AM
Re: shell trick? ( how to enable ENV file processing in suid script?)
man ksh
-p Disables processing of the $HOME/.profile
file and uses the file /etc/suid_profile
instead of the ENV file. This mode is on
whenever the effective uid (gid) is not
equal to the real uid (gid). Turning this
off causes the effective uid and gid to be
set to the real uid and gid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2003 08:28 AM
09-25-2003 08:28 AM
Re: shell trick? ( how to enable ENV file processing in suid script?)
Tried c-wrapper but it still had euid!=uid
Thanks everybody.