Difference between revisions of "Sudoers"

(Adding Article Footer & Categories)
Line 1: Line 1:
The file /etc/sudoers lists users authorized to run certain commands as other users. Edit this file if necessary with the '''visudo''' command. You should see some lines like the following, though the versions of '''postfix''' and '''openldap''' should match what's on your system rather than what is here.
+
The file /etc/sudoers lists users authorized to run certain commands as other users. Edit this file if necessary with the '''visudo''' command.
  
# grep zimbra /etc/sudoers
+
# grep zimbra /etc/sudoers
%zimbra   ALL=NOPASSWD:/opt/zimbra/openldap-2.3.21/libexec/slapd
+
%zimbra ALL=NOPASSWD:/opt/zimbra/openldap/libexec/slapd
%zimbra   ALL=NOPASSWD:/opt/zimbra/postfix-2.2.9/sbin/postfix, /opt/zimbra/postfix-2.2.9/sbin/postalias, /opt/zimbra/postfix-2.2.9/sbin/qshape.pl, /opt/zimbra/postfix-2.2.9/sbin/postconf,/opt/zimbra/postfix-2.2.9/sbin/postsuper
+
%zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmslapd
%zimbra   ALL=NOPASSWD:/opt/zimbra/libexec/zmqstat
+
%zimbra ALL=NOPASSWD:/opt/zimbra/postfix/sbin/postfix, /opt/zimbra/postfix/sbin/postalias, /opt/zimbra/postfix/sbin/qshape.pl, /opt/zimbra/postfix/sbin/postconf,/opt/zimbra/postfix/sbin/postsuper
%zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmtomcatstart
+
%zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmqstat,/opt/zimbra/libexec/zmmtastatus
%zimbra ALL=NOPASSWD:/opt/zimbra/perdition/sbin/perdition
+
%zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmmailboxdmgr
 
+
%zimbra ALL=NOPASSWD:/opt/zimbra/bin/zmvertmgr
# ls -l /opt/zimbra/openldap /opt/zimbra/postfix
 
lrwxrwxrwx  1 root root 27 May  9 14:23 /opt/zimbra/openldap -> /opt/zimbra/openldap-2.3.21
 
lrwxrwxrwx  1 root root 25 May  9 14:23 /opt/zimbra/postfix -> /opt/zimbra/postfix-2.2.9
 
  
 
Please also note it is advisable to check if the requiretty option is set.
 
Please also note it is advisable to check if the requiretty option is set.

Revision as of 21:59, 1 October 2009

The file /etc/sudoers lists users authorized to run certain commands as other users. Edit this file if necessary with the visudo command.

  1. grep zimbra /etc/sudoers

%zimbra ALL=NOPASSWD:/opt/zimbra/openldap/libexec/slapd %zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmslapd %zimbra ALL=NOPASSWD:/opt/zimbra/postfix/sbin/postfix, /opt/zimbra/postfix/sbin/postalias, /opt/zimbra/postfix/sbin/qshape.pl, /opt/zimbra/postfix/sbin/postconf,/opt/zimbra/postfix/sbin/postsuper %zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmqstat,/opt/zimbra/libexec/zmmtastatus %zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmmailboxdmgr %zimbra ALL=NOPASSWD:/opt/zimbra/bin/zmvertmgr

Please also note it is advisable to check if the requiretty option is set. This is done as follows

# grep requiretty /etc/sudoers
Defaults    requiretty

Using the visudo command comment it out like so. Please note the first # indicates root prompt, the second line # indicates the comment

# visudo
#Defaults    requiretty 

The requiretty line, on a Fedora Core system is around line 56. This may vary on other linux or Mac systems.


On SUSE10SP1 Enterprise Server with 5.0.1 when you get '/etc/sudoers' is 0640 needs to be 0440 and ldap fails to init.

Open /opt/zimbra/libexec/zmsetup.pl in your favorite text editor:
Goto Line: 56 (in 5.0.1)
Find 0640 change to 0440 and save.

/etc/sudoers needs to be 0440 or it will not complete the requested command. Re-run /opt/zimbra/libexec/zmsetup.pl if you got an error before and all should be good. check the above too.


Verified Against: Unknown Date Created: 6/8/2006
Article ID: https://wiki.zimbra.com/index.php?title=Sudoers Date Modified: 2009-10-01



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search