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-02-2004 09:25 PM
09-02-2004 09:25 PM
setuid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 09:39 PM
09-02-2004 09:39 PM
Re: setuid
It would be a security issue if any user could use the setuid call.
If you want to run a program under a different user id, you need to set the setuid bit on the executable, or run it using the "su
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 09:40 PM
09-02-2004 09:40 PM
Re: setuid
"root" is the usual, for sysadmin commands etc, but for example if you look in /usr/bin you will see files owned by "lp" and "uucp" etc, which run with their respective permissions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 09:47 PM
09-02-2004 09:47 PM
Re: setuid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 09:52 PM
09-02-2004 09:52 PM
Re: setuid
(as root)
cat >/tmp/test.sh <
id
EOF
chmod 4555 /tmp/test.sh
chown lp /tmp/test.sh
(as normal user)
/tmp/test.sh
uid=335(u20508) gid=102(tsg) euid=9(lp)
You see it runds as effective user id lp. Therefore it will be able to write to files the lp user can.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 09:52 PM
09-02-2004 09:52 PM
Re: setuid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 09:57 PM
09-02-2004 09:57 PM
Re: setuid
You are setting 4555 permissions , which essentially means execute permissions for others too.Others will anyhow be able to run this shell even without setuid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 09:59 PM
09-02-2004 09:59 PM
Re: setuid
perhaps you are misunderstanding the function of setuid?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 10:05 PM
09-02-2004 10:05 PM
Re: setuid
My understanding is
If you want that script to be runnable by others the o+x is enough .But if the script has permissions eg 744 and then you set the setuid on that , other will be able to exec the script as the effective user id wil change .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 10:10 PM
09-02-2004 10:10 PM
Re: setuid
You could for example chmod 4550 then chown root:nicepeople a file to give a file as follows: -
r-sr-x--- root:nicepeople
This would then be executable only by people in the "nicepeople" group, and would be executed as "root". Since o+x is not set, normal users would not be allowed to execute the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2004 11:00 PM
09-02-2004 11:00 PM
Re: setuid
#cat test
!#/usr/bin/sh
id
touch /tmp/cc
in this case is the test the owned by root and have 4777 permmissions , the /tmp/kk willl be created by root as the owner.But if yiu try the same thing in solaris it is created by the uid who is calling seuid exec not as a root.So there is more security in Solaris than HP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2004 12:47 AM
09-03-2004 12:47 AM
Re: setuid
All that being said, setuid for scripts should NEVER be allowed to exist on a production system and all mountpoints should have nosuid in fstab except for / /usr /opt. There is no valid reason to allow users setuid (ie, /home /var /tmp) privileges. Virtually all the requirements to create setuid scripts can be handled with the free program sudo.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2004 08:00 PM
09-03-2004 08:00 PM
Re: setuid
-rw-rw-rw- (666)
4000 (= u=s) Set user ID on file execution (file only)
2000 (= g=s) Set group ID on file execution (file only)
File execution permission is based on user - group - others permission.
If you want to be executed only by root user then,
It's permission may be as,
4755 --> It will setuid and give read / write access to group and other's.
If you want to block other user's to write then,
4744 - enough
Security to the file is designed on the file permission given to user - group - others.
Regards
Muthu