help: sudo command not working at all

Discussion in 'macOS' started by Oats, Nov 29, 2009.

  1. Oats macrumors regular

    Joined:
    Jan 8, 2003
    Location:
    New York
    #1
    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?
     
  2. mac2x macrumors 65816

    Joined:
    Sep 19, 2009
    #2
    Are you logged in as admin? IIRC, you can't use sudo from a regular account.
     
  3. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #3
    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
    
     
  4. xlii macrumors 68000

    xlii

    Joined:
    Sep 19, 2006
    Location:
    Millis, Massachusetts
    #4
    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.
     
  5. Oats thread starter macrumors regular

    Joined:
    Jan 8, 2003
    Location:
    New York
    #5
  6. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #6
    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.
     
  7. Oats thread starter macrumors regular

    Joined:
    Jan 8, 2003
    Location:
    New York
    #7
    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.
     
  8. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #8
    Yeah, until someone else gets to it and is able to use it because there is no admin password.
     
  9. sidewinder macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #9
    Don't auto login and set your account to be an admin account.

    S-
     
  10. Zortrium macrumors 6502

    Joined:
    Jun 23, 2003
    #10
    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).
     
  11. arjunindia99 macrumors newbie

    Joined:
    Jul 4, 2010
    #11
    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.
     
  12. Azagar macrumors member

    Azagar

    Joined:
    Nov 29, 2008
    Location:
    San Francisco
    #12
    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.
     

Share This Page