Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.programmer > #873

Re: Why user can change password?

From jt@toerring.de (Jens Thoms Toerring)
Newsgroups comp.unix.programmer
Subject Re: Why user can change password?
Date 2011-06-29 15:03 +0000
Organization Freie Universitaet Berlin
Message-ID <970t6oFp57U1@mid.uni-berlin.de> (permalink)
References <8d6a4a86-6fdf-4183-bfba-5ed322a98195@u28g2000yqf.googlegroups.com> <878vskn7bb.fsf@benfinney.id.au>

Show all headers | View raw


Ben Finney <ben+unix@benfinney.id.au> wrote:
> It's common for the program to be owned by the ‘root’ user, and ‘setuid’
> permission means that regardless of the user who runs the program, the
> permissions of the program will instead be those of the ‘root’ user.
> That's how the ‘/usr/bin/passwd’ program, for example, has permission to
> write the ‘/etc/passwd’ and ‘/etc/shadow’ files that aren't writeable by
> the account which starts the program.

> It's a significant security risk, of course. That's why it's considered
> a red flag for a program to have ‘setuid’ or ‘setgid’ permission. Be
> very wary of any program which claims to require that; there are very
> few legitimate reasons to require that, and the set of programs with
> those permissions should be very small on any given host.

Well, that seems to me to be a bit broad a claim. 'setuid' or
'setgid' doesn't equate to root permissions. And there can be
completely legitimate (and not really dangerous) use cases. E.
g. consider a program that needs access to the serial port to
be able to communicate with some attached device. The serial
port device files belong on many systems to the group 'uucp'
or 'dialout'. By 'setgid'-ing the program to that group every
user then can use the serial port via that program. And since
those groups don't have any special permissions no harm can be
done. It's probably even safer this way than to allow full ac-
cess to the serial port by each and every user with whatever
software by making its device file accessible to all users.

                             Regards, Jens
-- 
  \   Jens Thoms Toerring  ___      jt@toerring.de
   \__________________________      http://toerring.de

Back to comp.unix.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Why user can change password? Mateusz_madi <madi.czadi@gmail.com> - 2011-06-29 02:44 -0700
  Re: Why user can change password? jt@toerring.de (Jens Thoms Toerring) - 2011-06-29 09:55 +0000
  Re: Why user can change password? Ben Finney <ben+unix@benfinney.id.au> - 2011-06-29 22:36 +1000
    Re: Why user can change password? jt@toerring.de (Jens Thoms Toerring) - 2011-06-29 15:03 +0000
  Re: Why user can change password? John Gordon <gordon@panix.com> - 2011-06-29 14:41 +0000
    Re: Why user can change password? Golden California Girls <gldncagrls@aol.com.mil> - 2011-06-29 18:42 -0700
      Re: Why user can change password? Barry Margolin <barmar@alum.mit.edu> - 2011-06-29 22:29 -0400
      Re: Why user can change password? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-06-29 22:29 -0400
      Re: Why user can change password? gordonb.h6afl@burditt.org (Gordon Burditt) - 2011-06-29 22:10 -0500
      Re: Why user can change password? Nobody <nobody@nowhere.com> - 2011-06-30 18:10 +0100

csiph-web