sudo TTY Unknown messages

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Dec 29 07:59:14 PST 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20051229/6b30707e/signature.bin


More information about the freebsd-questions mailing list