HT204393: OS X Server: Adjusting message size limits for the Mail service

Learn about OS X Server: Adjusting message size limits for the Mail service
DreadFix

Q: when I copy it in the terminal, it tells me : " sudo: serveradmin: command not found "

what should I do ? What did I do wrong ?

MacBook Pro, OS X Server

Posted on Dec 18, 2013 3:45 PM

Close

Q: when I copy it in the terminal, it tells me : " sudo: serveradmin: command not found "

  • All replies
  • Helpful answers

  • by Antonio Rocco,

    Antonio Rocco Antonio Rocco Dec 18, 2013 5:12 PM in response to DreadFix
    Level 6 (10,582 points)
    Servers Enterprise
    Dec 18, 2013 5:12 PM in response to DreadFix

    Hi

     

    Unless it's a typo whilst posting I think you may have one too many colons?

     

    try:

     

    sudo serveradmin:whatever else it is you want etc

     

    instead and you might get to where you want to be?

     

    HTH?

     

    Tony

  • by Linc Davis,

    Linc Davis Linc Davis Dec 18, 2013 7:59 PM in response to DreadFix
    Level 10 (207,926 points)
    Applications
    Dec 18, 2013 7:59 PM in response to DreadFix

    Add to the PATH:

     

    /Applications/Server.app/Contents/ServerRoot/usr/sbin

  • by MrHoffman,

    MrHoffman MrHoffman Dec 19, 2013 7:12 AM in response to DreadFix
    Level 6 (15,612 points)
    Mac OS X
    Dec 19, 2013 7:12 AM in response to DreadFix

    This error?

     

    $ sudo serveradmin

    Password:

    sudo: serveradmin: command not found

    $

     

    That usually means you're not logged in on an OS X Server configuration — which is separate from having the Server.app tool loaded onto the system, when you're doing remote management —  or as Linc Davis mentions, that the PATH setting is incorrect.  The correct PATH should look something like this:

     

    $ sudo echo $PATH

    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/Server.app/Contents/S erverRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin

    $

     

    I wouldn't expect PATH to be incorrect on the root user on the server, barring some site-local tweaks to that context.  But if there have been changes to PATH, then I'd add both bin and sbin within Server.app into the path.  (This change should not be necessary, though.  The PATH should have the correct settings within Server.app by default.)

     

    If you're looking to use serveradmin on a remote server, then the usual approach is to enable and ssh into the target OS X Server system (ssh user@example.com), or to use ARD or related to push commands, or to use screen sharing and a remote desktop.   ssh is by far the lightest and fastest of these options.  

     

    AFAIK, the command-line serveradmin tool doesn't do remote management.  There's no obvious way provided to specify the identity of a target server.