Re: setuid script
- From: Chris Davies <chris-usenet@xxxxxxxxxxxx>
- Date: Sun, 22 Mar 2009 21:06:01 +0000
cesarino vinh <cesarinovinh77@xxxxxxxxx> wrote:
I just wanted to run my browser with a different user, because it's
safer :S
Safer than what...?
How can I do that? I'm using wright now the "gksu" - and then run as user...
so I can't make a shell script to do that, and I don't want to modify the
browser's executable, and I'm not in programming, but the solution is to
write an eg. C program to launch the browser, and then set SUID bit fot that
C app?
Use sudo and a script that sets up the environment appropriately
#!/bin/sh
#
# This script is safe ONLY if you can guarantee no other users are
# running programs on this system
####################################################################
#
xhost +local:
sudo -H -u otheruser DISPLAY="$DISPLAY" firefox "$@"
Then you add an entry in /etc/sudoers that allows you to sudo to the
user "otheruser" and run the firefox program (or whatever your preferred
browser is).
Chris
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- Follow-Ups:
- Re: setuid script
- From: Douglas A. Tutty
- Re: setuid script
- Prev by Date: Re: Bridging with firestarter and dhcp3-server.[SOLVED]
- Next by Date: Re: Top posting vs Bottom posting
- Previous by thread: Re: setuid script
- Next by thread: Re: setuid script
- Index(es):
Relevant Pages
|
Loading