Reseting the Hashed Password after enabling Windows File Sharing

Disclaimer: you'll need a good bit of knowledge about OS X, UNIX, and encryption to understand what I'm talking about.
All right, so normally OS X hashes user passwords using a salted SHA1 encryption. It uses shadowing so that you can't obtain the actual hash value using "% nidump passwd".
BUT, if you enable Windows File Sharing, all that changes. OS X re-hashes your password using the much less secure LANMAN encryption. This allows Windows machines to access your files. (LANMAN is what Windows used to encrypt passwords up through Windows ME. Later versions of Windows use NTLM instead, which is stronger.) This is why, the first time you enable Windows File Sharing, OS X warns you that enabling the feature will require your password to be stored in a less secure manner; it's downgrading the hash from SHA1 to LANMAN.
My question is: I'm done sharing files with idiot Windows users - how do I force OS X to go back to storing my password using SHA1?
Thanks guys.
-Bryan

Thanks biovizier. You're absolutely right, deleting the extra text after ";shadowHash;" and then reseting the password for the user's account does seem to force OS X to rehash the password using SHA1.
Just in case someone else has this question in the future, here's how to verify that your password is hashed in SHA1:
Log in as Root and open the /private/var/db/shadow/hash folder. You'll see files with long, weird names. You'll also see an XML file (with the extension *.state) for each of the files with long, weird names. The XML file contains several tags that tell OS X information about the hashed password - things like when it last logged on, when it was created, how many times login failed, etc.
We're interested in the other files - the ones that don't end in ".state"
To verify that SHA1 is being used, open the long, weird files in textedit. You should see something like this:
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000059G31HJ75BR54210P07Y57BC57094D643H78K8765L98C6X000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000
There should be a few more zeros; I've cut some out here to save space.
What should NOT exist, is the following:
57Y083D243109VGR45Z4B65812R8M087H65HJ8OK95T89L8JHL9000000000
000000000000000000000000000000000000000000000000000000000000
0000000059G31HJ75BR54210P07Y57BC57094D643H78K8765L98C6X00000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000
The second Hashed value does not start with zeros. This hash value is not SHA1. It is the less secure encryption method required for compatability with Windows.
If your hash file opens with zeros, you're using SHA1. Otherwise, follow Biovizier's procedure: Open NetInfo, select the user account whose password needs to be changed back to SHA1, look at the "authentication_authority" value, make sure the value is set to ;ShadowHash; and that no additional text follows that string, then reset the affected account's password. You can then log back in as root and re-check the hash files using textedit and you should find that the hash file opens with solid zeros instead of letters and numbers.
Do NOT manually edit the hash files in textedit. One of those files is the hash for the Root password. If you change that hash file, your root password will no longer work (because when you type MYPASSWORD, OS X will hash that string and find that the hashed value no longer matches the stored hash value in /private/var/db/shadow/hash and OS X will therefore reject your password as incorrect) and you will quickly find yourself locked out of your computer for good.
And finally, just in case you have the computing power of the NSA and are thinking about running the hashes I've listed here: A) They aren't the right length; I've left some characters out and B) I randomly substituted different alphanumerics in for the ones in my real hashes with no rhyme or reason.
Which brings me to another point: NEVER post your hashes online. Yes, it takes a TON of computing power to break them, but still, they're hidden away for a reason!
Anyway, I hope this helps other security buffs out there.
I'm going to make a suggestion to Apple that OS 10.5 be changed so that when you unclick "windows file sharing" the OS immediately rehashes your password in SHA1 again.
-Bryan

Similar Messages

  • Why did I have to enable Windows File Sharing to share files between two Mavericks iMacs?

    File Sharing failed between my Mavericks iMacs.  The console logs showed that the target iMac saw the ntlmv2 protocol as unknown to the kdc.  I fixed it by enabling Windows File Sharing on the target Mavericks iMac.  I had tried disabling SMB on both iMacs and leaving AFP on, but then nothing happened when I tried to connect.  Why did I have to enable Windows File Sharing to share files between two Mavericks iMacs?

    When you enable file sharing you need to have either SMB (Windows) or AFP (historically Apple-native) file sharing checked. The default in Mavericks is SMB, and not AFP.
    If you uncheck both, then the system will turn off file sharing. Apple supports the use of both SMB and AFP connections in Mavericks, so with only AFP enabled you should have been able to establish a connection, but there could be a small bug or configuration-specific snafu that you're encountering.
    With AFP enabled only, try pressing Command-K in the Finder to open the Connect To Server dialogue, and in here enter the address to the system using afp:// as the protocol, such as the following (the name can be looked up in the Sharing system preferences):
    afp://my_imac.local

  • My Macbook is running on OS 10.5.8. However, I forgot my admin password. I would like to find out if I can use OS 10.6 CD to reset the admin password while upgrading OS? Also, will all my files be still present after upgrade??

    My Macbook is running on OS 10.5.8. However, I forgot my admin password. I would like to find out if I can use OS 10.6 CD to reset the admin password while upgrading OS? Also, will all my files be still present after upgrade??

    1. Should be possible to do that; go to the Utilities menu and select 'reset password' before starting the installer. (while booted from the DVD of course)
    2. Standard installation of SL only replaces system components; applications, user data and preference settings should not be affected.
    3. But you do have a backup just in case, don't you?

  • TS1424 Tried to use my apple id to update some apps and got"Connection Manager::invoke:: Failed to find service connection url"  After this occured a few times I reset the id password, and this was confirmed by email.  It still fails with same message.  I

    Tried to use my apple id to update some apps and got"Connection Manager::invoke:: Failed to find service connection url"  After this occured a few times I reset the id password, and this was confirmed by email.  It still fails with same message.  Ideas?

    Hi, you have to logout from your iTunes account and reconnect it:
    Settings / iTunes & App Stores / ...
    https://mobilfunkexperten.de/news/13450/sporadische-probleme-im-itunes-und-app-s tore
    Hope this helps... :-)

  • I bought a used Macbook that came with the OS 10.7 upgrade, How can I reset the admin password?

    How can I reset the admin password I don't have the old password. I bought it used and the disk's it came with are OS 10.5 how can i get this password reset without losing any of the upgrades or files?

    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    When the menubar appears select Terminal from the Utilities menu. Enter resetpassword at the prompt and press RETURN. Follow instructions in the dialog window that will appear.
    Or see Reset a Mac OS X 10.7 Lion Password and OS X Lion- Apple ID can be used to reset your user account password.

  • Reset the master password through applescript

    I understand that the correct procedure to reset the master password is to delete these two files from the computer:
    /Library/Keychains/FileVaultMaster.cer
    /Library/Keychains/FileVaultMaster.keychain
    The next step is to go into system preferences and click users and groups. The lock has to be unlocked and then the settings button has to be clicked. The text will now say set master password. I can now enter in information in the new popup screen.
    I would like to automate this process through applescript. I need some help on navigation of the system preferences. I have looked at turn Airport on and off code through applescript and don't quite understand how to click the settings and unlock buttons.
    Here is that code:
    tell application "System Preferences"
      activate
    end tell
    tell application "System Events"
      tell process "System Preferences"
        click menu item "Sharing" of menu "View" of menu bar 1
        delay 2
        tell window "Sharing"
          click checkbox 1 of row 11 of table 1 of scroll area 1 of group 1
          delay 1
          if (exists sheet 1) then
            if (exists button "Turn AirPort On" of sheet 1) then
              click button "Turn AirPort On" of sheet 1
              delay 1
            end if
            click button "Start" of sheet 1
          end if
        end tell
      end tell
    end tell

    Resetting or changing a password:
    For Snow Leopard or earlier:  http://support.apple.com/kb/HT1274
    For Lion or later:  http://support.apple.com/kb/HT6022
    This is also useful:
    http://www.macworld.co.uk/ipad-iphone/news/?newsid=3463233&olo=email
    If it's running Mac OS X 10.6.8 or earlier, insert a Mac OS X install DVD, restart with the Option key held down, click on it, and use the Reset Password utility.
    If it's running Mac OS X 10.7 or newer, restart with the Command and R keys held down, open the Terminal, and use the resetpassword command:
    https://discussions.apple.com/docs/DOC-4101
    If it the Keychain password that needs resetting:
    http://support.apple.com/kb/ts1544

  • Firefox crashes when I try to reset the master password using chrome://pippki/content/resetpassword.xul

    # Question
    Firefox 3.6.10 on Windows 7 crashes when I try to reset the master password using chrome://pippki/content/resetpassword.xul. Is there an alternate way of resetting the master password?

    You can delete the 2 files that contain password details, they will be re-created automatically. First open the profile folder, for details of how to find it see the [[profiles]] article. Now close Firefox and delete key3.db and signons.sqlite. If there are files called signons.txt, signons2.txt and signons3.txt you can delete those as well, they are from earlier versions of Firefox.

  • How do I reset the admin password on MacBook Air

    Does anyone know how to reset the admin password on MacBook Air ?

    OS X 10.7 Lion, 10.8 MountainLion & 10.9 Mavericks
    Reset Password starting from Recovery HD
    Start the computer,then press and hold down command and R keys to start into recovery partition.
    When you see the Apple logo, release the keys.
    Wait until  OS X Utilities window shows up.
    Move the mouse to the menubar at the top and click "Utilities", then select "Terminal"
    from the drop down.
    Terminal window will appear.
    Type in   resetpassword   and press enter on the keyboard.
    Leave the Terminal window open.
    Reset Password Utility window will open with Macintosh HD selected.
    Select the user account from the popup menu box.
    Enter a new password.
    Reenter the new password for the user.
    Enter a hint.
    Click the "Save" button.
    Click  in the menubar and select Restart.
    Log in.
    If Keychain dialog box appears, select “Create New Keychain”.

  • How do  you reset the root password in Mountain Lion?

    After install of Mountain Lion on my old iMac, I could not enter administrator, no password would work, Apple support helped me go through terminal to reset root password and root as administrator . I then was able to reset myself as administrator with a new pasword. I used that paassword a few times now it wont accept it again. I dont remember all the steps to reset the root password and recover from this situation.. Can anyone help?  Is this a bug in Mountain Lion?

    I'm having similar issues but other concerns
    1. Can't go into recovery mode since its protected by firmware password, which I don't have. All option keys sequences go into the same firmware padlock, which I don't have the apparent pin.
    2. In terminal mode it didn't happen to recognize that unix command.  Also since I'm just on guest would that reset for the admin or possibly the guest acct?
    3. I've done the DIMM pulls and even though older model, 2011, it didn't appear to a reset for the firmware password.
    Any other options??

  • HT201240 how do you reset the restriction password on my ipod

    how do reset the restriction password on my ipod

    Hey Wheatstock,
    It sounds like you might be experiencing issues with the passcode on your iPod touch. If that's the case and maybe you've forgotten the passcode or your device is disabled after inputting an incorrect one, take a look at this article:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    If, however, you're talking about Restrictions / Parental Controls, you'd want to take a look here:
    If you lose or forget a restriction passcode, you will need to perform a factory restore to remove it.
    via:
    iOS: Understanding Restrictions (Parental Controls)
    http://support.apple.com/kb/ht4213
    All the best,
    David

  • After Enable .xml file on office 365 is block.

    HI,
    Is there any solution.
    after enable .xml file on office 365 for owa not able to view and download. xml files.
    I have run below commmand
    Get-OwaMailboxPolicy | Set-OwaMailboxPolicy -BlockedFileTypes @{Remove = ".xml"}
    Get-OwaMailboxPolicy | Set-OwaMailboxPolicy -AllowedFileTypes @{Add = ".xml"}
    Get-OwaMailboxPolicy | Set-OwaMailboxPolicy -BlockedMimeTypes @{Remove = "text/xml", "application/xml”}
    Get-OwaMailboxPolicy | Set-OwaMailboxPolicy –AllowedMimeTypes @{Add = "text/xml", "application/xml”}
    is there any thing else that I should do
    thanks

    Hi,
    Run this command to make sure XML is added into allowedtypes : 
    (get-OwaMailboxPolicy OwaMailboxPolicy-Default).AllowedFileTypes
    Also confirm, If you still getting this error message? (or) It is just not showing the preview in OWA?
    It might take some time for replication, after that you will have an option to download : 
    Regards,
    Kingson
    Thanks, Kingson

  • I have an older iMac (OS X 10.4.11), and I forgot my master password.  Is there anything I can do to reset the master password?

    I have an older iMac (OS X 10.4.11), and I forgot my master password.  Is there anything I can do to reset the master password?

    Here's the instructions if you have the discs.
    Mac OS X: Changing or resetting an account password
    http://support.apple.com/kb/HT1274?viewlocale=en_US
    Changing your administrator password
    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh655.html
    Here's one method to reset the password without the install disc:
    1. boot computer and hold the "apple" key and the "s" key.
    2. wait for terminal show
    3. release keys
    4. type without the quotes: "/sbin/mount -uaw"
    5. press enter
    6. type without the quotes: "rm /var/db/.applesetupdone
    7. press enter
    8. type without the quotes: "reboot"
    9. press enter
    This will let you create a new admin account when you reboot your computer.
    Also, without the discs, look at Mac OS X Tip - No Password, No Root, No CD? No Problem.
    http://www.macobserver.com/tip/2003/06/16.1.shtml
    Here is a way to get around not knowing the admin password on Macs.
    To reset your OS X password without an OS X CD you need to enter terminal and create a new admin account:
       1. Reboot
       2. Hold apple + s down after you hear the chime.
       3. When you get text prompt enter in these terminal commands to create a brand new admin account (hitting return after each line):
              * mount -uw /
              * rm /var/db/.AppleSetupDone
              * shutdown -h now
       4. After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one and you’re good to go again!
     Cheers, Tom

  • Windows file sharing can no longer work after tiger upgrade

    hi guys, ive been searching the web to find a cure on my problem for a long time now, but still no success, hope someone could help me out.
    ok heres my problem, before the upgrade, file sharing with windows is perfect, with no problems at all, but when i upgraded one of our mac to tiger, windows file sharing is not working anymore, i cant connect or see my windows xp computer on the network and vice versa, windows cannot see my mac with tiger on the network.
    Our other 2 macs here running in panther are fine( meaning, windows file sharing is working)
    Now we've bought a new computer which is a mac pro with fresh install of leopard, i setup the windows file sharing, but i was surprised that i cant see my windows xp box too on the network, and vice versa, the pc cant see my mac pro too on the network, whats wrong with tiger and leopard file sharing???? please help me, im so frustrated cant make it to work. i know, my pc computer has nothing to do with it, coz i can still connect to a mac with panther os. hope someone can help me fix this... please..

    This site has some information on file sharing and printer sharing between Windows and Macs for various combinations of OSs. The Leopard repository isn't quite as mature as the Tiger repository, but there's a lot of good information at this site. Hopefully, it will be helpful to you in resolving your Windows/Mac issues.

  • TS2220 How do you reset the network password for Airport wireless?

    How do you reset the network password for Airport wireless?

    Use AirPort Utility...select the AirPort Express and in the menu select Base Station...Restore Default Settings...

  • How to view the change immediately after a java file is modified without restarting server or redeploy?

              Hi All,
              How to view the change immediately after a java file that is used in jsp is modified
              without restarting server or redeploy?
              Moreover, it is better to keep the original session.
              Any suggestion is appreciated.
              Kammau
              

              Hi,
              In order to have a new version of a java class, the current classloader must be
              deleted and a new one created. This is what redeployment does. I believe that
              this is more of an issue with Sun's implementation of classloaders. You could
              ask BEA support (719.232.7878) and see if they have any plans to periodically
              check jar files to see if java class file timestamps and destroy and re-create
              classloaders on the fly.
              1) You will still have to accept the performance hit of destroying classloaders
              and creating new ones. There isn't any way around that.
              2) I would think you would want to have more explicit control in production and
              integration anyway.
              You can redeploy applications from the command line (script) file not just the
              console.
              Hope this helps,
              pat
              "Kammau" <[email protected]> wrote:
              >
              >Hi All,
              >How to view the change immediately after a java file that is used in
              >jsp is modified
              >without restarting server or redeploy?
              >Moreover, it is better to keep the original session.
              >Any suggestion is appreciated.
              >
              >Kammau
              

Maybe you are looking for

  • 500 Internal server error when running SOLMAN_SETUP

    Hi experts, I'm configuring our solution manager with the SOLMAN_SETUP transaction. In the "initial Configuration", step "j2ee configuration", I click the "Start SLD configuration" button and appears an Internet explorer. After loggin with an adminis

  • Aspire V3-571 not providing connected signal to monitor in power save

    I recently reconfigured a number of my systems, and ended up with an Acer monitor on my Acer Aspire - the monitor had previously been used with a Dell laptop. You would think two Acer products would work better together, but it's actually slightly wo

  • Validating detached signature with jsr105

    Hi all. I need to sign a SOAP message and I need to use JSR105. I've created a message with the following code and is signed without problems. However, I can't validate the signature. As you can see the elements that contains the nodes are OMElement

  • Having problems logging into the apple apps

    hi i have got an iphone 4 and i am trying to log in to buy some games i am putting my id and my password but it keeps saying the password is wrong.  i have resetted my password several times but still wont allow me to log in.  can anyone help me with

  • I have an error every time i open a PDF file

    This is what appear when i open a PDF file: "An error has been detected with a required application library and the product cannot continue. Please reinstall the application." And i did reinstall... What should I do now?