Closed hemanth closed 9 years ago
Can you run security find-generic-password -D "AirPort network password" -ga ssid
and paste the output?
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
@kevva
Update: After adding to keychain
○ → security find-generic-password -D "AirPort network password"
keychain: "/Library/Keychains/System.keychain"
class: "genp"
attributes:
0x00000007 <blob>="home"
0x00000008 <blob>=<NULL>
"acct"<blob>="home"
"cdat"<timedate>=0x32303134313130343035333232325A00 "20141104053222Z\000"
"crtr"<uint32>=<NULL>
"cusi"<sint32>=<NULL>
"desc"<blob>="AirPort network password"
"gena"<blob>=<NULL>
"icmt"<blob>=<NULL>
"invi"<sint32>=<NULL>
"mdat"<timedate>=0x32303134313130343035333232325A00 "20141104053222Z\000"
"nega"<sint32>=<NULL>
"prot"<blob>=<NULL>
"scrp"<sint32>=<NULL>
"svce"<blob>="AirPort"
"type"<uint32>=<NULL>
So the -ga ssid
option doesn't work even after adding it to your keychain?
Yup.
@sindresorhus, do you have any idea why this happens?
I get the same. The reason this happens is because I have iCloud password syncing on, which means the wifi passwords are in the iCloud
keychain, not the System
one.
Your current check is also incorrect as it just get's the first password it finds, not the most recently used one.
@hemanth @sindresorhus could you test the new version?
Works fine! Thanks.
Use
-wflag to display password directly
alright.
:+1: Works now :)
On
14.0.0 Darwin Kernel Version
am I missing something?Connected to a n/w with WPA2 secured password.