Re: Kernel 2.3.49/51 and exec permissions

2000-03-14 Thread willy
On Sun, Mar 12, 2000 at 06:20:30PM -0500, Bob Hilliard wrote:
 The Doctor What [EMAIL PROTECTED] writes:
 
  but not if I try to sudo to a non-root id (this is as root, note the #):
  bash-2.04# sudo -u man bash
  sudo: unable to exec /bin/bash: Permission denied
 
  This doesn't affect your main question, but you are using the
 wrong syntax for sudo.  The -u option takes a username/uid argument.
 Your command is telling sudo to run bash as user man, who doesn't
 exist.  sudo is normally run by a user (not root) who is listed in the
 file /etc/sudoers.

debian has man as uid number 6.


Re: Kernel 2.3.49/51 and exec permissions

2000-03-13 Thread Bob Hilliard
The Doctor What [EMAIL PROTECTED] writes:

 but not if I try to sudo to a non-root id (this is as root, note the #):
 bash-2.04# sudo -u man bash
 sudo: unable to exec /bin/bash: Permission denied

 This doesn't affect your main question, but you are using the
wrong syntax for sudo.  The -u option takes a username/uid argument.
Your command is telling sudo to run bash as user man, who doesn't
exist.  sudo is normally run by a user (not root) who is listed in the
file /etc/sudoers.

 Your sudo problems don't appear to be related to your suid
problems.

Bob
-- 
   _
  |_)  _  |_   Robert D. Hilliard[EMAIL PROTECTED]
  |_) (_) |_)  Palm City, FL  USAPGP Key ID: A8E40EB9


Re: Kernel 2.3.49/51 and exec permissions

2000-03-13 Thread The Doctor What
* Bob Hilliard ([EMAIL PROTECTED]) [000313 07:44]:
 The Doctor What [EMAIL PROTECTED] writes:
 
  but not if I try to sudo to a non-root id (this is as root, note the #):
  bash-2.04# sudo -u man bash
  sudo: unable to exec /bin/bash: Permission denied
 
  This doesn't affect your main question, but you are using the
 wrong syntax for sudo.  The -u option takes a username/uid argument.
 Your command is telling sudo to run bash as user man, who doesn't
 exist.  sudo is normally run by a user (not root) who is listed in the
 file /etc/sudoers.

I'm sorry, but that is exactly what I was trying to do.  Show that I
can become any user other than root.  Here is the same command
working on a system without these problems:
gerf,  3:02PM Mon 13 sudo -u man bash
Password:
bash-2.03$ id
uid=6(man) gid=100(users) groups=100(users)

But thanks for trying to help.

Ciao!

-- 
The wheel is turning but the hamster is dead.

The Doctor What: What, Doctor What http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC


Kernel 2.3.49/51 and exec permissions

2000-03-12 Thread The Doctor What
Just so you know, I've been searching *everywhere* for info on this and
it's driving me nuts!

I've been following debian unstable for a while.  Currently that's
'woody'.  I reciently upgraded my kernel from on old 2.3.3x (35 I
think) to 2.3.49, complete with devfs configured.

Since then, if I run the 2.3.49 kernel, I can run *any* setuid
programs.

/usr/lib/man-db/man (which is the real, setuid binary for man)
produces the following behavior:
-
bash-2.04$ ls -al /usr/lib/man-db/man
-rwsr-xr-x1 man  root82752 Feb 29 00:27 /usr/lib/man-db/man
bash-2.04$ id
uid=1000(docwhat) gid=1000(docwhat) 
groups=1000(docwhat),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),37(operator),50(staff)
bash-2.04$ /usr/lib/man-db/man
/usr/lib/man-db/man: error in loading shared libraries: libc.so.6: cannot open 
shared object file: No such file or directory
bash-2.04$ sudo bash
bash-2.04# /usr/lib/man-db/man
/usr/lib/man-db/man: error in loading shared libraries: libc.so.6: cannot open 
shared object file: No such file or directory
bash-2.04# strace /usr/lib/man-db/man
strace: exec: Permission denied
execve(/usr/lib/man-db/man, [/usr/lib/man-db/man], [/* 58 vars */]) = 0
bash-2.04# gdb --quiet /usr/lib/man-db/man
GNU gdb 19990928
Copyright 1998 Free Software Foundation, Inc.
(no debugging symbols found)...
(gdb) run
Starting program: /usr/lib/man-db/man 
/usr/lib/man-db/man: error in loading shared libraries: libc.so.6: cannot open 
shared object file: No such file or directory

Program exited with code 0177.
(gdb) quit
-

This isn't true just of man, btw.  It's true of *all* setuid/setgid
programs that aren't setuid/setgid root.  As you can see, sudo works,
but not if I try to sudo to a non-root id (this is as root, note the #):
bash-2.04# sudo -u man bash
sudo: unable to exec /bin/bash: Permission denied

I hope someone can throw some light on this, it's driving me nuts and I
can't find anyone else reporting similar problems!

Kernel info:
2.3.49 and 2.3.51 compiled for a K6-2 AMD with gcc 2.95.2

Ciao!

-- 
Home is where you wear your hat.
--Dr. Emilio Lizardo (Adventures of Buckaroo Banzai)

The Doctor What: Second Baseman  http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC