security: SecKeychainSearchCopyNext: (Wi-Fi password via Terminal) im trying to view (as root) wifi passwords in plaintext via Terminal[1] but get the following error:
sh-3.2# security find-generic-password -ga &quot;ROUTER-NAME-HERE&quot;
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.

sh-3.2# security find-generic-password -a lily -s &quot;ROUTER-NAME-HERE&quot; -g
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.

so i googled the error[2] but i didnt find the answer helpful.

[1] How to access the Wi-Fi password through Terminal?
[2] https://stackoverflow.com/questions/8303755/keychain-security-command-line-tool-works-with-find-internet-passwords-but-not-f

sh-3.2# system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: OS X 10.8.5 (12F45)
      Kernel Version: Darwin 12.5.0
      Boot Volume: lily
      Boot Mode: Normal
      Computer Name: lily’s MacBook Air
      User Name: System Administrator (root)
      Secure Virtual Memory: Enabled
      Time since boot: 12:37

sh-3.2# uname -a
Darwin lily-MacBook-Air.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
Display the WiFi password of a named wireless network exactly like this, replacing "wifinetworkname" with your wireless network name in quotes:

security find-generic-password -D "AirPort network password" -l "wifinetworkname" -w