I want to deploy smb password with ARD, or create a small script.

With the command security I have the possibility to add a password in keychain without share the password.

security add-internet-password -a "user" -s "" -w "password" -l "" -D "network password" -r "smb " -T /System/Library/CoreServices/NetAuthAgent.app/Contents/MacOS/NetAuthSysAgent

But I like to encrypt the password as does if sharing wifi password (https://www.idownloadblog.com/2018/01/11/ios-11-how-to-share-wi-fi-passwords) and the user doesn't see it.

But in the man I don't see how to do it!

  • This is not a good way of approaching this. Why not create a unique account for the user and grant them the proper permissions rather than try and deploy passwords? Secondly, WiFi uses a pasphrase which is an encryption key that both the WAP and the client know. It's not transmitted in any way. If you need more security, consider RADIUS.
    – Allan
    Mar 9, 2019 at 13:54

1 Answer 1


The “encryption” used for WiFi passwords is really just a part of the WiFi security protocol. I.e. it is a kind of precalculation of what would otherwise happen when you attach to a WiFi network. This is very specific to WiFi.

If you did the same “precalculation” for a SMB password, it wouldn’t work anymore and it can’t be used for logging on to SMB shares.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .