Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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

Reply
3 replies

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.

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

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