{"id":468,"date":"2016-09-05T15:14:31","date_gmt":"2016-09-05T15:14:31","guid":{"rendered":"http:\/\/www.tinone71.com\/wordpress\/?p=468"},"modified":"2016-09-05T15:14:31","modified_gmt":"2016-09-05T15:14:31","slug":"how-to-find-wi-fi-network-passwords-from-command-line-on-mac-osxdaily","status":"publish","type":"post","link":"https:\/\/www.tinone71.com\/wp\/?p=468","title":{"rendered":"How to Find Wi-Fi Network Passwords from Command Line on Mac | OSXDaily"},"content":{"rendered":"<div style=\"\" class=\"ssag-opads-main     \" ><\/div><h1>How to Find Wi-Fi Network Passwords from Command Line on Mac<\/h1>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-469\" src=\"http:\/\/www.tinone71.com\/wordpress\/wp-content\/uploads\/2016\/09\/wpa-150x131.jpg\" alt=\"wpa\" width=\"150\" height=\"131\" srcset=\"https:\/\/www.tinone71.com\/wp\/wp-content\/uploads\/2016\/09\/wpa-150x131.jpg 150w, https:\/\/www.tinone71.com\/wp\/wp-content\/uploads\/2016\/09\/wpa.jpg 454w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>Given the complexity of some wi-fi network passwords combined with the general infrequency of entering them and that they\u2019re typically saved on use, it\u2019s not terribly unusual to forget what a specific routers wireless password is. Fortunately, if you\u2019re on a Mac, there are a few ways to go about finding those lost or forgotten wi-fi router login details.<\/p>\n<div><\/div>\n<p>Perhaps the easiest method is <a href=\"http:\/\/osxdaily.com\/2010\/12\/10\/forgot-wireless-password\/\">recovering forgotten wireless passwords with KeyChain Access in OS X<\/a>, but if you\u2019re an advanced Mac user you may wish to retrieve the same data from the command line, and that\u2019s what we\u2019re going to demonstrate here.<\/p>\n<h3>Find &amp; Show Wi-Fi Network Passwords from the Command Line in OS X<\/h3>\n<p>To get started with this trick, open the Terminal app from \/Applications\/Utilities\/, then use the following command syntax to find and display the password for a specific wireless network:<\/p>\n<p><code>security find-generic-password -ga \"ROUTERNAME\" | grep \"password:\"<\/code><\/p>\n<p>Replace \u201cROUTERNAME\u201d with the exact name of the wireless router you want to retrieve the password for. You do not need to be connected to that network to recover the password for that network, you only need to have joined it once, and saved the password for it when you connected at that time.<\/p>\n<p>For example, let\u2019s say the wireless router name is \u201cYOUR-ROUTER\u201d, the command would look like the following:<\/p>\n<p><code>security find-generic-password -ga \"YOUR-ROUTER\" |grep \"password:\"<\/code><\/p>\n<p>Hitting return and running that command string will request an administrator login (or you can prefix with sudo), which will then return the password for the given router, looking like the following:<\/p>\n<p><code>$ security find-generic-password -ga \"YOUR-ROUTER\" |grep \"password:\"<br \/>\npassword: \"osxdailysecretpassword\"<\/code><\/p>\n<p>In this example, the password for \u2018YOUR-ROUTER\u201d is \u201cosxdailysecretpassword\u201d, minus the quotations.<\/p>\n<p>This command can be particularly helpful if you combine it with the ability to <a href=\"http:\/\/osxdaily.com\/2012\/12\/21\/list-wi-fi-networks-mac-has-connected-to-before\/\">list all wireless networks a Mac has connected to before<\/a>, particularly if you can\u2019t remember the exact name or spelling of a specific router.<\/p>\n<p>You can also leave off the pipe to grep, which will report back additional details about the queried router, most of the added data reported isn\u2019t particularly useful though, thus why we\u2019re cleaning up the output and shortening it with grep. For those curious, the command return without the grep pipe would look something like the following:<\/p>\n<p><code>$ security find-generic-password -ga \"YOUR-ROUTER-NAME\"<br \/>\nkeychain: \"\/Library\/Keychains\/System.keychain\"<br \/>\nclass: \"genp\"<br \/>\nattributes:<br \/>\n0x00000007 blob=\"YOUR-ROUTER-NAME\"<br \/>\n0x00000008 blob=NULL<br \/>\n\"acct\"blob=\"YOUR-ROUTER-NAME\"<br \/>\n\"cdat\"timedate=0x52192841772471472498124818A00 \"20150723143649Z\\000\"<br \/>\n\"crtr\"uint32=NULL<br \/>\n\"cusi\"sint32=NULL<br \/>\n\"desc\"blob=\"AirPort network password\"<br \/>\n\"gena\"blob=NULL<br \/>\n\"icmt\"blob=NULL<br \/>\n\"invi\"sint32=NULL<br \/>\n\"mdat\"timedate=0x52192841772471472498124818A00 \"20150723143649Z\\000\"<br \/>\n\"nega\"sint32=NULL<br \/>\n\"prot\"blob=NULL<br \/>\n\"scrp\"sint32=NULL<br \/>\n\"svce\"blob=\"AirPort\"<br \/>\n\"type\"uint32=NULL<br \/>\npassword: \"osxdaily\"<\/code><\/p>\n<p>In this case, the wi-fi password for \u2018Your-Router-Name\u2019 with \u2018password: \u201cosxdaily\u201d\u2018 is at the very bottom of the returned command.<\/p>\n<p>As mentioned already, you can <a href=\"http:\/\/osxdaily.com\/2010\/12\/10\/forgot-wireless-password\/\">find the same wi-fi login details from KeyChain Access tool in OS X<\/a>, and you don\u2019t even need to be connected to the wi-fi network you are retrieving the password for, which is extremely helpful for those times you get a phone call from a friend or family member asking \u201chey what\u2019s the password for the router at so-and-so house\u201d (maybe I\u2019m the only one who gets those calls). Whether you go the command line route as described here, which is ultimately just a terminal approach to the keychain anyway, or through the more user friendly KeyChain Access application, is up to you.<\/p>\n<p>Thanks to <a href=\"http:\/\/lifehacker.com\/find-the-wi-fi-password-for-your-current-network-with-t-1717978747?\" target=\"_blank\">LifeHacker<\/a> for pointing out this great trick, we cleaned it up a bit with grep but for PC users, Lifehacker goes further to demonstrate how to perform the same wi-fi router password finding from a Windows PC too, which could be undoubtedly helpful to many users, based primarily on Macs or otherwise.<\/p>\n<div><\/div>\n<\/div>\n<div>\n<div><\/div>\n<div>\n<p>Enjoy this tip? <strong>Subscribe to the OSXDaily newsletter<\/strong> to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:<\/p>\n<\/div>\n<\/div>\n<div><\/div>\n<div>\n<div>\n<div>\n<div>540<\/div>\n<\/div>\n<\/div>\n<div>\n<div>\n<div>141<\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to Find Wi-Fi Network Passwords from Command Line on Mac &nbsp; Given the complexity of some wi-fi<\/p>\n","protected":false},"author":1,"featured_media":469,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.tinone71.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/468"}],"collection":[{"href":"https:\/\/www.tinone71.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tinone71.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tinone71.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tinone71.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=468"}],"version-history":[{"count":1,"href":"https:\/\/www.tinone71.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/468\/revisions"}],"predecessor-version":[{"id":470,"href":"https:\/\/www.tinone71.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/468\/revisions\/470"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tinone71.com\/wp\/index.php?rest_route=\/wp\/v2\/media\/469"}],"wp:attachment":[{"href":"https:\/\/www.tinone71.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tinone71.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tinone71.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}