Help with VISUDO command...

All,

I am trying to get my backup program to run a precommand script that will shutdown the mail server on my Mac OS X Server (10.5). The only issue is that I can't have a password request box appear (as this will all be done automatically).

So after looking into it - I think I could do it by editing the visudo command and putting something like this in:

administrator ALL=(ALL) NOPASSWD:/usr/sbin/serveradmin

but it does not seem to be working for me...any suggestions?

Thanks,

Michael

Mac OS X (10.5.1)

Posted on Dec 11, 2007 9:51 AM

Reply
6 replies

Dec 11, 2007 11:34 AM in response to Michael-StLouis

Not sure which Backup software you use, but I wouldn't do it this way. If something fails during backup, you will end up with stopped mail services or backup mail files, while the mail server is still running.

Use mailbfr to do a local backup of your mail services and then include this local backup into your main backup script/software. mailbfr will correctly stop mail services, make a backup and restart mail services when done. Available for free here: http://osx.topicdesk.com/tools/

Dec 11, 2007 11:45 AM in response to Michael-StLouis

That is a TOTALLY awesome script and will do EXACTLY what I need it to do...thanks so much for your help!

While we are on the subject of backing up....is there any recommendations on how to backup the rest of my Mac Server? I want to get everything incase there is ever an issue.

Currently I am running:

1) Webserver (with blogs and Wikis)
2) DNS
3) OD
4) Mail (taken care of now)
5) VPN

Would like to have the Streaming server up and running at some time.

I use IBM's Tivoli Storage Manager to manage my backups and DEFINITELY want to keep using it.

Michael

Dec 12, 2007 2:49 PM in response to Michael-StLouis

Hi

su root

Supply the password and then run any serveradmin command you like. Like this:

su root
serveradmin fullstatus mail

Or simply prefix everything with sudo. Using su root means you only have to supply the root password once. You have to supply the password everytime if you decide to prefix every command with sudo

Although you should follow Pterobyte’s advice especially as it concerns the mail service.

Hope this helps, Tony

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Help with VISUDO command...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.