Sponsored Content
Operating Systems AIX Why /bin/su permission with SUID? Post 302910427 by Corona688 on Thursday 24th of July 2014 11:36:00 AM
Old 07-24-2014
Permit me to be quite extremely blunt. Your auditor is an idiot. He has heard that "SUID is bad" and parroted it, but has no real understanding of it. Following his advice will ruin your machine.

su couldn't possibly work if it weren't SUID. It needs to access the shadow files, which are locked to root!

Now, if there are things which are set SUID but shouldn't be, that would be bad. Having cp set SUID would be a recipe for disaster for example.
These 3 Users Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

/bin/sh: bad interpreter: Permission denied

today i started the LFS book (version 4.0). Basically i am using slackware 9.0 to try and install a new linux completely from source on another partition. Now i took the book's recommendations and created a user called lfs so i wouldn't have to do the stuff as root, and i have got the new LFS... (4 Replies)
Discussion started by: Calum
4 Replies

2. UNIX for Dummies Questions & Answers

fuser: difference with bin/sh and bin/ksh shell script

Hi, I have a problem I don't understand with fuser. I launch a simple shell script mysleep.sh: I launch the command fuser -fu mysleep.sh but fuser doesn't return anything excepted: mysleep: Then I modify my script switching from #!/bin/sh to #!/bin/ksh I launch the command fuser -fu... (4 Replies)
Discussion started by: Peuj
4 Replies

3. Solaris

/usr/bin has been changed with 777 permission

Hello Guruz, Relay bad condition :mad: Some has changed the permission to 777 recursively for /usr/bin directory by mistake. Now all the permission looks to be 777 on /usr/bin Hence I am so many system related errors as 1 show below. When I am trying to change the password, I am getting... (5 Replies)
Discussion started by: bullz26
5 Replies

4. OS X (Apple)

I accidentally changed to only write permission on /usr/bin... please Help!

I accidentally changed to sudo chmod a=w to my /usr/bin folder on my macbook with OS 10.5.8... Please help! I can't even get into a terminal correctly cause it displays: -bash: uname: command not found -bash: cut: command not found -bash: uname: command not found -bash: cut: command not found... (6 Replies)
Discussion started by: scaryMac23
6 Replies

5. Red Hat

/bin strange permission, corrupted? [solved]

Hi I think my /bin is corrupted which is why I can’t boot my server.. Anyone knows what below file permission means? # ls -l /mnt/sysimage | grep bin drwxr-xr-x 2 root root 12288 Sep 29 11:23 sbin ?r--rw-x 41112 16694 1305152 0 Feb 10 2055 bin Tried overwriting, deleting,chmod,chown but... (0 Replies)
Discussion started by: halacil
0 Replies

6. OS X (Apple)

When to use /Users/m/bin instead of /usr/local/bin (& whats the diff?)?

Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself. But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Discussion started by: michellepace
1 Replies

7. Shell Programming and Scripting

[Solved] Retrieve all the permission of the /bin folder

hello friends, By mistake I have run find / -type f -exec chmod 644 {} \; now all permission has been chaged of /bin I am not able to change the permission. I am working on the virtuozzo VPS. Is their any way to retrieve the permission to 770 to /bin Note /bin/chmod also not executing... (2 Replies)
Discussion started by: sharlin
2 Replies

8. AIX

Redistribution bin required for AIX. j7r164redist.7.1.0.25.bin

Hi, I am planning to install a version of Informatica on my AIX box. It requires a specific java build in pap6470_27sr2-20141101_01(SR2). The current link for IBM 64-bit SDK for AIX®, JavaTM Technology Edition, Version 7 Release 1 has a more recent version in j7r164redist.7.1.0.75.bin. Is... (4 Replies)
Discussion started by: meetpraveens
4 Replies

9. UNIX for Dummies Questions & Answers

Difference between inbuilt suid programs and user defined root suid programs under bash shell?

Hey guys, Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries. However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies

10. Shell Programming and Scripting

Usage of #!/bin/sh vs #!/bin/bash shell scripts?

Some question about the usage of shell scripts: 1.) Are the commands of the base shell scripts a subset of bash commands? 2.) Assume I got a long, long script WITHOUT the first line. How can I find out if the script was originally designed für "sh" or "bash"? 3.) How can I check a given... (3 Replies)
Discussion started by: pstein
3 Replies
privbind(1)															       privbind(1)

NAME
privbind - allow an unprivileged application to bind with reserved ports. SYNOPSIS
privbind -u user [ -g group] [ -n num] [ -l path] command [ arguments ... ] DESCRIPTION
Normally in Linux, only a superuser process can bind an Internet domain socket with a reserved port (port numbers less than 1024). Accord- ingly, server processes are typically run with superuser privileges, which can be dropped after binding the reserved port. privbind can execute an application as an unprivileged user with just one extra privilege: it can bind to reserved ports. privbind is useful in several situations. It can be used when the application is not trusted enough; It can be used when the server is written in a language without the setuid(2) feature (e.g., Java(TM)); It can also be used to run applications which don't manipulate their own user id and need to be able to bind to a reserved port without needing any other root privileges. OPTIONS
-u The -u option is mandatory, and specifies under which user to run the given command. The user can be specified using either a user- name or a numeric user id. It should be an unprivileged (non-root) user. -g Specifies the group to switch to when running the given command. If this option is missing, then the given user's default group is used. -n privbind's default behaviour is to allow the application to call bind(2) with reserved ports an unlimited number of times. In order to do that (see "HOW IT WORKS" below), the privbind helper process needs to wait for the application to exit before it terminates. The -n num option tells privbind that it can assume that only num binds need to be given elevated privileges. After this number of bind(2) calls have been executed, privbind's helper process will exit, leaving behind only the unprivileged application running. -l Mostly for internal use during build. Gives the explicit path to the LD_PRELOAD library. -h Shows a short help screen, and exits. EXIT STATUS
Using technical jargon, privbind execs command as its main process, running itself in the background (as a child of the application's process). The practical upshot of this, in layman's terms, is that the user never sees privbind's exit status. When running privbind, the process will exit whenever, and with whatever exit status, command does. The above point should be particularly noted when using privbind to run daemons. SECURITY CONSIDERATIONS
privbind has no SUID parts, and runs within the confines of a single process. This serves to minimize the security implications of using it. It is strongly advised that privbind not be made SUID, as this would allow any user that can run it to run any process as any other (non-root) user. At the moment privbind detects such a situation and warns about it, but will continue with the execution. HOW IT WORKS
In a nutshell, privbind works by starting two processes. One drops privileges and runs (exec(2)) the command, the other remains as root. Privbind makes sure to keep a unix domain socket connecting the two processes. Privbind uses LD_PRELOAD to intercept every call to bind(2) made by the program. Calls that can be completed non-privileged are done so. Calls that require root privileges are forwarded to the root process, that carry them out on the program's behalf. A more detailed explanation is available in the README file. BUGS
privbind currently uses "SOCK_SEQPACKET" for communication between privileged and non-privileged processes. This socket type is only imple- mented on Linux kernel 2.6.4 and later, which makes privbind none portable to older Linux kernels and many other non-Linux platforms. VERSION
The version of privbind described by this manual page is 1.0 (June 12, 2007) COPYRIGHT
Copyright (C) 2006-2007, Shachar Shemesh plus others. See the AUTHORS file. privbind was written by Shachar Shemesh, with contributions from Amos Shapira and Nadav Har'El. privbind is free software, released under the GNU General Public License (GPL). See the COPYING file for more information and the exact license terms. The latest version of this software can be found in http://sourceforge.net/projects/privbind Java is a registered trademark of Sun Microsystems. SEE ALSO
su(1), sudo(8), capabilities(7), bind(2), setuid(2), ld.so(8), unix(7) Privbind 0.1 22 May 2007 privbind(1)
All times are GMT -4. The time now is 07:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy