HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- setuid scripts
Operating System - HP-UX
1833792
Members
2142
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
12-23-2002 07:47 AM
12-23-2002 07:47 AM
setuid scripts
Consider following:
==== CUT HERE ====
(marec@flex02:/tmp)$ cat ./test.ksh
#!/bin/ksh
# Suid script ?
echo "---START---"
/usr/bin/id
echo "---STOP---"
(marec@flex02:/tmp)$ ls -l ./test.ksh
-r-sr-xr-x 1 root sys 77 Dec 23 16:43 ./test.ksh
(marec@flex02:/tmp)$ ./test.ksh
---START---
uid=29946(marec) gid=601(wawapp) euid=0(root)
---STOP---
==== CUT HERE ====
And now on different HP-UX:
==== CUT HERE ====
helmut:/home/staff/rba$ cat p
#!/bin/ksh
# Suid script ?
echo "---START---"
/usr/bin/id
echo "---STOP---"
helmut:/home/staff/rba$ ls -l p
-r-sr-x--- 1 root staff 78 Dec 23 15:05 p
helmut:/home/staff/rba$ ./p
./p: Setuid execution not allowed
---START---
uid=501(rba) gid=100(staff)
---STOP---
==== CUT HERE ====
Both machines are:
(marec@flex02:/tmp)$ uname -sr
HP-UX B.11.00
What could be different here? exec(2) tells that setuid is not supported on scripts, but I can run them on one machine, but not on the other. Is this some (undocummented?) kernel parameter or ? All suggestions really appriciated.
Regards,
Marek C.
==== CUT HERE ====
(marec@flex02:/tmp)$ cat ./test.ksh
#!/bin/ksh
# Suid script ?
echo "---START---"
/usr/bin/id
echo "---STOP---"
(marec@flex02:/tmp)$ ls -l ./test.ksh
-r-sr-xr-x 1 root sys 77 Dec 23 16:43 ./test.ksh
(marec@flex02:/tmp)$ ./test.ksh
---START---
uid=29946(marec) gid=601(wawapp) euid=0(root)
---STOP---
==== CUT HERE ====
And now on different HP-UX:
==== CUT HERE ====
helmut:/home/staff/rba$ cat p
#!/bin/ksh
# Suid script ?
echo "---START---"
/usr/bin/id
echo "---STOP---"
helmut:/home/staff/rba$ ls -l p
-r-sr-x--- 1 root staff 78 Dec 23 15:05 p
helmut:/home/staff/rba$ ./p
./p: Setuid execution not allowed
---START---
uid=501(rba) gid=100(staff)
---STOP---
==== CUT HERE ====
Both machines are:
(marec@flex02:/tmp)$ uname -sr
HP-UX B.11.00
What could be different here? exec(2) tells that setuid is not supported on scripts, but I can run them on one machine, but not on the other. Is this some (undocummented?) kernel parameter or ? All suggestions really appriciated.
Regards,
Marek C.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2002 08:17 AM
12-23-2002 08:17 AM
Re: setuid scripts
First thing that drops my mind is that it is possible to permit/deny SUID scripts on a per filesystem basis. You can check using sam or
# grep -i suid /etc/fstab
if I'm not mistaken
# grep -i suid /etc/fstab
if I'm not mistaken
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2002 10:03 AM
12-23-2002 10:03 AM
Re: setuid scripts
Are you sure you are a member of the group 'staff' on helmut? What happens if you (temporarily) do a 'chmod 555 p' and try to run it again?
Or if your primary group is not staff, chown the file to your primary group.
Hope it helps
John
Or if your primary group is not staff, chown the file to your primary group.
Hope it helps
John
Spoon!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2002 05:05 AM
12-24-2002 05:05 AM
Re: setuid scripts
Have you checked how the file system is mounted? Check to see if it's mounted "no suid."
Independent by nature
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP