- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Set UID Programs
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
01-23-2003 03:00 AM
01-23-2003 03:00 AM
Set UID Programs
Cheers
Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 03:12 AM
01-23-2003 03:12 AM
Re: Set UID Programs
;^)
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 03:32 AM
01-23-2003 03:32 AM
Re: Set UID Programs
will give you a list of all root setuid programs. You can then check the permissions to see if any have write permissions that they shouldn't have.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 03:48 AM
01-23-2003 03:48 AM
Re: Set UID Programs
# find / -type f -user 0 -perm -u+s -a \( -perm -u+w -o -perm -g+w -o -perm -o+w \) -exec ls -l {} \;
...will find all files (-type f) where the owner is root (-user 0) with the setuid bit on AND (-a) with write permissions on either the owner OR (-o) the group OR the world. For any files found, an 'ls' listing will be output.
See the 'find' and 'chmod' man pages for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 06:08 AM
01-23-2003 06:08 AM
Re: Set UID Programs
You can give umask & check the umask permissions if it is 777 then it has got write permissions to the others also if u want to change the umask settings either you can edit /sbin/init.d/inetd file & change the umask to 022 or u can give umask 022 in /etc/profile file so that whatever files u will be creating now it will be with 722 permissions & the others & group wont have write permissions.
As far uid is concern i think you can check /etc/passwd for user id's.I hope this solves your problem.
Regards,
Rajesh G.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2003 01:21 PM
01-24-2003 01:21 PM
Re: Set UID Programs
which removes this threat. Example:
# touch foo
# chmod 4777 foo
# ll foo
-rwsrwxrwx 1 root sys 0 Jan 24 14:00 foo
# echo foobar >> foo
# ll foo
-rwsrwxrwx 1 root sys 7 Jan 24 14:00 foo
# su bin
$ echo foobar >> foo
$ ll foo
-rwxrwxrwx 1 root sys 14 Jan 24 14:01 foo
$
Note that the setuid bit is now cleared even though nobody did a chmod of the file after
the su.