Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Oats

macrumors regular
Original poster
Jan 8, 2003
194
1
New York
I can't seem to run a sudo command in the OS X terminal. Every time I run a sudo command, I get no response, as if the command is not run at all... my sudo appears to be broken somehow. I've got a problem with mounting an NTFS drive that is dirty.. I have a command I am trying to run using the "sudo" command, but it is not working.

Code:
sudo /usr/local/bin/ntfs-3g /dev/disk0s3 /Volumes/WIN\ XP -o force

after the sudo, I am prompted for my password, but after that the only response i get is another prompt, as if the command was totally ignored. i have tried many different commands after the sudo, and cannot get a response from anything. i even tried "sudo tcsh", which should open up a new shell, but nothing. "sudo ls" also shows nothing, just another prompt.

what could be wrong?
 
Are you logged in as admin? IIRC, you can't use sudo from a regular account.
 
if you cannot do a "sudo ls" and you're an admin, perhaps your sudoers file got clobbered somehow.

do a cat on it and verify that "%admin ALL=(ALL) ALL" is present

You can also enable root and execute
Code:
su -
/usr/local/bin/ntfs-3g /dev/disk0s3 /Volumes/WIN\ XP -o force
 
from "man sudo" in the terminal window...

If a user who is not listed in the sudoers file tries to run a command via sudo, mail is sent to the proper authorities, as defined at
configure time or in the sudoers file (defaults to root). Note that the mail will not be sent if an unauthorized user tries to run sudo
with the -l or -v option. This allows users to determine for themselves whether or not they are allowed to use sudo.

Try sudo -l or sudo -v

-l[l] [command]
If no command is specified, the -l (list) option will list
the allowed (and forbidden) commands for the invoking user
(or the user specified by the -U option) on the current
host. If a command is specified and is permitted by
sudoers, the fully-qualified path to the command is
displayed along with any command line arguments. If
command is specified but not allowed, sudo will exit with a
status value of 1. If the -l option is specified with an l
argument (i.e. -ll), or if -l is specified multiple times,
a longer list format is used.
 
blank passwords a definitely a no-no. Not just because the sudo command doesn't work but also because t does impact your system.

If you don't want to worry about passwords on your mac, just select auto-logon.
 
blank passwords a definitely a no-no. Not just because the sudo command doesn't work but also because t does impact your system.

If you don't want to worry about passwords on your mac, just select auto-logon.
I have auto-logon already. I just don't like being prompted for my password when doing things like installing a new program or starting my virtual machine. It's just me using the computer.
 
I have to wonder what business someone has running terminal commands with sudo when they went to such trouble to make it easy to get their computer screwed up (inadvertently or otherwise).
 
Help sudo command

Plz help

When i'm running sudo -s it is asking for password but when i'm typing password it's not coming there...i mean it's not displaying my password...the cursor is not moving at all....i've admin password and it's not letting me to enter my password.
 
Plz help

When i'm running sudo -s it is asking for password but when i'm typing password it's not coming there...i mean it's not displaying my password...the cursor is not moving at all....i've admin password and it's not letting me to enter my password.

Don't worry that is normal, when you enter a sudo command and are asked for your password you will never see any indication that you're inputing it. Just type it in like normal and hit enter and if done right you command will continue.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.