Date: Fri, 22 Mar 2002 16:46:23 -0800 (PST) From: Jason Stone <jason@shalott.net> To: Fernan Aguero <fernan@iib.unsam.edu.ar> Cc: FreeBSD Security <freebsd-security@FreeBSD.ORG> Subject: RE: su -c user command not working Message-ID: <20020322162750.T2391-100000@walter> In-Reply-To: <657B20E93E93D4118F9700D0B73CE3EA02FFF4C4@goofy.epylon.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > Also you can try: su -m man -c catman You can also install djb's daemontools from /usr/ports/sysutils/daemontools and then use setuidgid to run stuff as a different user. Alternatively, you could just use some perl: perl -e '$uid = `id -u man`; $gid = `id -g man`;' \ -e '$( = $) = "$gid $gid"; $> = $< = $uid; exec "myscript";' will run "myscript" with real and effective uid/gid set to "man". -Jason ----------------------------------------------------------------------- I worry about my child and the Internet all the time, even though she's too young to have logged on yet. Here's what I worry about. I worry that 10 or 15 years from now, she will come to me and say "Daddy, where were you when they took freedom of the press away from the Internet?" -- Mike Godwin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: See https://private.idealab.com/public/jason/jason.gpg iD8DBQE8m9BnswXMWWtptckRAt1rAJ97jxZ5NhpCqyWG2VPFqeYxrMNragCZASZy Ni/OXSjKzsEiDiLH9FGE8W8= =qCgg -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020322162750.T2391-100000>