Results 1 to 5 of 5

Thread: sudo vs su - zimbra

  1. #1
    Join Date
    Oct 2006
    Posts
    69
    Rep Power
    9

    Exclamation sudo vs su - zimbra

    Hi

    why with this command

    sudo -u zimbra /opt/zimbra/bin/zmcontrol start &

    web access on port 443 didn't work

    instead with this two command

    su - zimbra
    zmcontrol start

    web access on port 443 is ok?

    I use OS zimbra 4.5.1 on Suse10.0

    before with OS 4.0.2 sudo was ok

  2. #2
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    21

    Default

    Please file a bug in bugzilla so that our devs can look at it.

    john

  3. #3
    Join Date
    Oct 2006
    Posts
    69
    Rep Power
    9

    Default

    Hi
    i have open bug 15105
    I hope to find a solution or a workaround because so every time my backup script runs my web access client stops to work

  4. #4
    Join Date
    Oct 2010
    Posts
    22
    Rep Power
    5

    Default Obviously sudo is not su -

    Quote Originally Posted by cedbl View Post
    Hi

    why with this command

    sudo -u zimbra /opt/zimbra/bin/zmcontrol start &

    web access on port 443 didn't work

    instead with this two command

    su - zimbra
    zmcontrol start

    web access on port 443 is ok?

    I use OS zimbra 4.5.1 on Suse10.0

    before with OS 4.0.2 sudo was ok
    First at all a sudo will never be the same as
    su - %user

    Sudo gains some permissions as the users you are granting to, but keeps same enviroments of the user who is running the task.

    As example user wants to run as zimbra a commando with sudo. Obviously first at all all zimbra has the rigths just for zimbra user.

    I do not understand why people keep using sudo, but anyway is taste of taste i prefer to run commands into user enviroment not with my enviroment and perms of another i will fall into problems when the output will request enviroment of the other user.

    for scripts do not use sudo, "su - zimbra" neither, use <su -c "/opt/zimbra/bin/zmcontrol stop" zimbra> as root, you can use it into your maintanance scripts in your cronjobs and run them as root and do anything as zimbra user doing a good job in a cleaning way without using the problematic and dirty sudo.

    I never has used sudo since i read the first time it just jump you to oter perms but keep your enviroment, so if you want tu keep using it your desire. I do not have anithyng to sudo but must of problems everywhere of friends is because they want tu run programs or some scripts as sudo users then i correct them without sudo and all work.

    Sudo does not have bugs, the bugs are those who want to use it for everything, sudo came to solve an specific task low task can be done with sudo as asking for ifconfig in those system there are some restrictions, but not for administrative task. Some people will say they have used it without problems but i would like they tell me the same compiling all the kernel from zero with sudo, there are task it will not work, into hardware compiling as root or into the correct user with the correct enviroment the task will fulfill everything, sudo is not for everything remember this.

    use well the tools.

  5. #5
    Join Date
    Oct 2010
    Posts
    22
    Rep Power
    5

    Default

    It is not a bug, the problem is it will not work with sudo. Running a command looking the zimbra enviroment, but with sudo will see other enviromente not equal to the zimbra enviroment.

    Sudo works in this way.

Similar Threads

  1. Replies: 31
    Last Post: 12-15-2007, 08:05 PM
  2. Zimbra shutdowns every n hours.
    By Andrewb in forum Administrators
    Replies: 13
    Last Post: 08-14-2007, 08:55 AM
  3. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 06:38 PM
  4. Monitoring : Data not yet avalaible
    By s3nz3x in forum Installation
    Replies: 7
    Last Post: 11-30-2005, 06:18 PM
  5. FC3 Install and no zimbra ?
    By aws in forum Installation
    Replies: 10
    Last Post: 10-09-2005, 04:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •