Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2005 15:58:53 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Robin Becker <robin@reportlab.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: sudo TTY Unknown messages
Message-ID:  <43B407BD.2070603@infracaninophile.co.uk>
In-Reply-To: <43B3FE2C.4020502@chamonix.reportlab.co.uk>
References:  <43B3F12B.7010307@chamonix.reportlab.co.uk> <43B3FE2C.4020502@chamonix.reportlab.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43B407BD.2070603>