sudo: user: command not found

Hi there,



I'm struggling with this sudo problem.


All i've been doing with terminal was logging into another account on my iMac and running an application, so i write sudo disk (disk is username for the other account)


then i enter password and path to the application


i've been doing this for past 3-4 month every day, bet since yesterday after entering pasword i get this error - sudo: user: command not found


Any help here would be appreciated!



Thank you

iMac, Mac OS X (10.6.7)

Posted on Jun 7, 2011 4:41 AM

Reply
25 replies

Jun 7, 2011 9:40 AM in response to K T

I did repair disk permissions earlier today.. now i tried to do it again and it gave me same errors as before and one of them was not repaired:


Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will not be repaired.



How do i check drive health?

Jun 7, 2011 11:01 AM in response to K T

which sudo returns: /usr/bin/sudo



i used First Aid to verify disk permissions 3 times.. repaired them, but it keeps giving me the same errors every time i hit Verify Disk Permissions..


List of errors:

Permissions differ on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jconsole.ja r", should be lrwxr-xr-x , they are lrw-r--r-- .
User differs on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib", should be 0, user is 95.
User differs on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries", should be 0, user is 95.
Permissions differ on "System/Library/Java/Support/Deploy.bundle/Contents/Home/lib/security/cacerts", should be lrwxr-xr-x , they are lrw-r--r-- .
Permissions differ on "System/Library/Java/Support/Deploy.bundle/Contents/Resources/Java/deploy.jar", should be lrwxr-xr-x , they are lrw-r--r-- .
Permissions differ on "System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPluginCocoa.b undle/Contents/Resources/Java/deploy.jar", should be lrwxr-xr-x , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jconsole.jar ", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/ Contents/Home/lib/security/cacerts", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/ Contents/Resources/Java/deploy.jar", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/ Contents/Resources/Java/libdeploy.jnilib", should be -rwxr-xr-x , they are lrwxr-xr-x .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/ Contents/Resources/JavaPluginCocoa.bundle/Contents/Resources/Java/deploy.jar", should be lrwxr-xr-x , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Resources/JavaPlugin Cocoa.bundle/Contents/Resources/Java/deploy.jar", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Resources/JavaPlugin Cocoa.bundle/Contents/Resources/Java/libdeploy.jnilib", should be -rwxr-xr-x , they are lrwxr-xr-x .
Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will not be repaired.


Permissions verification complete



Are these pretty bad errors? Are these causing sudo not to work?

Jun 7, 2011 12:13 PM in response to baranka

You wrote in your first post that the error you were getting is:


error - sudo: user: command not found


The fact that you're getting the error sudo: disk: command not found shows that you need the -U in front of disk to indicate its a user and not a command. sudo is trying to run disk as a command the way you;re typing it in.


run sudo -U disk command and you won't get the error

Jun 7, 2011 12:16 PM in response to Frank Caggiano

well i meant user anyway.. lets say i typed sudo steve and got sudo: steve: command not found



with sudo -U steve i get this:


baranka-iMac:~ baranka$ sudo -U steve

sudo: the `-U' option may only be used with the `-l' option

usage: sudo [-n] -h | -K | -k | -L | -V | -v

usage: sudo -l[l] [-AnS] [-g groupname|#gid] [-U username] [-u username|#uid]

[-g groupname|#gid] [command]

usage: sudo [-AbEHnPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u

username|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]

usage: sudo -e [-AnS] [-C fd] [-g groupname|#gid] [-p prompt] [-u

username|#uid] file ...

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.

sudo: user: command not found

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