From owner-freebsd-questions@FreeBSD.ORG Thu Dec 29 15:59:14 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C320B16A41F for ; Thu, 29 Dec 2005 15:59:14 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (imap.infracaninophile.co.uk [81.187.76.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F1AA43D5C for ; Thu, 29 Dec 2005 15:59:12 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from [IPv6:::1] (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.13.4/8.13.4) with ESMTP id jBTFx09T004594; Thu, 29 Dec 2005 15:59:00 GMT (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <43B407BD.2070603@infracaninophile.co.uk> Date: Thu, 29 Dec 2005 15:58:53 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051221) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robin Becker References: <43B3F12B.7010307@chamonix.reportlab.co.uk> <43B3FE2C.4020502@chamonix.reportlab.co.uk> In-Reply-To: <43B3FE2C.4020502@chamonix.reportlab.co.uk> X-Enigmail-Version: 0.93.0.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig58B1961704ED22B370E96E0F" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (smtp.infracaninophile.co.uk [IPv6:::1]); Thu, 29 Dec 2005 15:59:00 +0000 (GMT) X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: sudo TTY Unknown messages X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2005 15:59:14 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig58B1961704ED22B370E96E0F Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Robin Becker wrote: > I'm being daft; it seems sudo always logs itself. Is there away to get > sudo to not syslog if it's root sudoing as www? I looked at sudoers, but > couldn't see an obvious way to set !syslog for > > root > www using svnadmin or svnlook etc etc Well, if you're starting as root, you can just use: su user -c 'some command line' to run a command as whatever user you want -- no password required. su will log to /var/log/auth.log but it's nowhere near as verbose as sudo. Or you can use /etc/crontab which has an extra field specifying which UID a command should be run as, unlike the normal per-user crontab files. Usual advice is to leave /etc/crontab alone and put your local cron jobs into the per-user crontab files. However the system crontab file /can/ be customised if you really want to -- you'll just have to merge any changes when you do system updates and so forth. But on the whole, the best and cleanest solution to running cron jobs as some arbitrary user is to create a crontab file for that user. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig58B1961704ED22B370E96E0F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDtAfD8Mjk52CukIwRA8hjAJwOQN44ytjZfPcVdSq2NFVdQe7QuACgiagc EgYav14O+C1HYfZZ0GiOdYs= =YMtK -----END PGP SIGNATURE----- --------------enig58B1961704ED22B370E96E0F--