[Linux-Anyway] Setuid root

  • From: Horror Vacui <horrorvacui@xxxxxxx>
  • To: Linux-Anyway@xxxxxxxxxxxxx
  • Date: Thu, 26 Sep 2002 13:10:57 +0200

I never could quite understand how setuid and setgid works, never used 
it before. As the only user I could su to root when I needed it. My 
brother only needs to run the pptp client to connect to the ISP, and 
until now I've been too lazy to have the client setuid root - I've told 
him the root password, and told him to watch it - no commands but the 
one I gave him. But now he's got a bit interested and wanted to know a 
couple of commands more. I trust him, but shit happens - I'd like to 
reduce the risk that he might forget he's root and harm the penguin. So 
I did chmod 4655 pptp, which changed -rwxr-xr-x to -rwSr-xr-x. So when 
you start it as normal user, it runs with the UID of the file owner, 
right? Process listing says so. But then:
12:31:19 xxx@xxx:~/ >> (unknown)[2348]: 
log[pptp_dispatch_ctrl_packet:pptp_ctrl.c:531]: Client connection 
established.
(unknown)[2348]: log[pptp_dispatch_ctrl_packet:pptp_ctrl.c:637]: 
Outgoing call established.
Failed to open /dev/ttya0: Permission denied
[1]+  Exit 7                  /sbin/pptp alcatel

What the shell is happening? Why should it be able to open /dev/ttya0 
when I su to root, but not this way? I know I could change the 
permissions, but for all I know this shouldn't be necessary.

Cheers
Horror Vacui

To unsubcribe send e-mail with the word unsubscribe in the body to:   
Linux-Anyway-Request@xxxxxxxxxxxxx?body=unsubscribe

Other related posts:

  • » [Linux-Anyway] Setuid root