{"id":4651,"date":"2022-12-20T18:09:27","date_gmt":"2022-12-20T21:09:27","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/nmsettingskeyfile-man5\/"},"modified":"2022-12-20T18:09:27","modified_gmt":"2022-12-20T21:09:27","slug":"nmsettingskeyfile-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/nmsettingskeyfile-man5\/","title":{"rendered":"NM&minus;SETTINGS&minus;KEYFILE (man5)"},"content":{"rendered":"<h1 align=\"center\">NM\u2212SETTINGS\u2212KEYFILE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#FILE FORMAT\">FILE FORMAT<\/a><br \/> <a href=\"#DETAILS\">DETAILS<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">nm-settings-keyfile \u2212 Description of <i>keyfile<\/i> settings plugin<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">NetworkManager is based on the concept of connection profiles that contain network configuration (see <b>nm-settings<\/b>(5) for details). The profiles can be stored in various formats. NetworkManager uses plugins for reading and writing the data. The plugins can be configured in <b>NetworkManager.conf<\/b>(5).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>keyfile<\/i> plugin is the generic plugin that supports all the connection types and capabilities that NetworkManager has. The files are in a .ini\u2212style format and located in \/etc\/NetworkManager\/system\u2212connections\/, \/usr\/lib\/NetworkManager\/system\u2212connections\/ and \/run\/NetworkManager\/system\u2212connections\/. This plugin is always enabled and will automatically be used to store any connections that are not supported by any other active plugin. For security, it will ignore files that are readable or writable by any user other than &#8216;root&#8217; since private keys and passphrases may be stored in plaintext inside the file.<\/p>\n<h2>FILE FORMAT <a name=\"FILE FORMAT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>keyfile<\/i> config format is a simple .ini\u2212style format. It consists of sections (groups) of key\u2212value pairs. Each section corresponds to a setting name as described in the settings specification (<b>nm-settings<\/b>(5)). Each configuration key\/value pair in the section is one of the properties listed in the settings specification. The majority of properties of the specification is written in the same format into the <i>keyfile<\/i> too. However some values are inconvenient for people to use. These are stored in the files in more readable ways. These properties are described below. An example could be IP addresses that are not written as integer arrays, but more reasonably as &#8220;1.2.3.4\/12 1.2.3.254&#8221;. More information of the generic key file format can be found at <b><font color=\"#0000FF\">GLib key file format<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">(Lines beginning with a &#8216;#&#8217; are comments, lists are separated by character ; etc.).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Users can create or modify the <i>keyfile<\/i> connection files manually, even if that is not the recommended way of managing the profiles. However, if they choose to do that, they must inform NetworkManager about their changes (for example via <i>nmcli con (re)load<\/i>).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Examples of keyfile configuration<\/b>.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>A sample configuration for an ethernet network:<\/b> <br \/> [connection] <br \/> id=Main eth0 <br \/> uuid=27afa607\u2212ee36\u221243f0\u2212b8c3\u22129d245cdc4bb3 <br \/> type=802\u22123\u2212ethernet <br \/> autoconnect=true<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">[ipv4] <br \/> method=auto<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">[802\u22123\u2212ethernet] <br \/> mac\u2212address=00:23:5a:47:1f:71<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>A sample configuration for WPA\u2212EAP (PEAP with MSCHAPv2) and always\u2212ask secret:<\/b> <br \/> [connection] <br \/> id=CompanyWIFI <br \/> uuid=cdac6154\u2212a33b\u22124b15\u22129904\u2212666772cfa5ee <br \/> type=wifi <br \/> autoconnect=false<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">[wifi] <br \/> ssid=CorpWLAN <br \/> mode=infrastructure <br \/> security=802\u221211\u2212wireless\u2212security<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">[wifi\u2212security] <br \/> key\u2212mgmt=wpa\u2212eap<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">[ipv4] <br \/> method=auto<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">[ipv6] <br \/> method=auto<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">[802\u22121x] <br \/> eap=peap; <br \/> identity=joe <br \/> ca\u2212cert=\/home\/joe\/.cert\/corp.crt <br \/> phase1\u2212peapver=1 <br \/> phase2\u2212auth=mschapv2 <br \/> password\u2212flags=2<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>A sample configuration for openvpn:<\/b> <br \/> [connection] <br \/> id=RedHat\u2212openvpn <br \/> uuid=7f9b3356\u2212b210\u22124c0e\u22128123\u2212bd116c9c280f <br \/> type=vpn <br \/> timestamp=1385401165<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">[vpn] <br \/> service\u2212type=org.freedesktop.NetworkManager.openvpn <br \/> connection\u2212type=password <br \/> password\u2212flags=3 <br \/> remote=ovpn.my\u2212company.com <br \/> cipher=AES\u2212256\u2212CBC <br \/> reneg\u2212seconds=0 <br \/> port=443 <br \/> username=joe <br \/> ca=\/etc\/openvpn\/ISCA.pem <br \/> tls\u2212remote=ovpn.my\u2212company.com<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">[ipv6] <br \/> method=auto<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">[ipv4] <br \/> method=auto <br \/> ignore\u2212auto\u2212dns=true <br \/> never\u2212default=true<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>A sample configuration for a bridge and a bridge port:<\/b> <br \/> [connection] [connection] <br \/> id=MainBridge id=br\u2212port\u22121 <br \/> uuid=171ae855\u2212a0ab\u221242b6\u2212bd0c\u221260f5812eea9d uuid=d6e8ae98\u221271f8\u22124b3d\u22129d2d\u22122e26048fe794 <br \/> interface\u2212name=MainBridge interface\u2212name=em1 <br \/> type=bridge type=ethernet <br \/> master=MainBridge <br \/> [bridge] slave\u2212type=bridge <br \/> interface\u2212name=MainBridge<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><b>A sample configuration for a VLAN:<\/b> <br \/> [connection] <br \/> id=VLAN for building 4A <br \/> uuid=8ce1c9e0\u2212ce7a\u22124d2c\u2212aa28\u2212077dda09dd7e <br \/> interface\u2212name=VLAN\u22124A <br \/> type=vlan<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">[vlan] <br \/> interface\u2212name=VLAN\u22124A <br \/> parent=eth0 <br \/> id=4<\/font><\/p>\n<h2>DETAILS <a name=\"DETAILS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>keyfile<\/i> plugin variables for the majority of NetworkManager properties have one\u2212to\u2212one mapping. It means a NetworkManager property is stored in the keyfile as a variable of the same name and in the same format. There are several exceptions to this rule, mainly for making keyfile syntax easier for humans. The exceptions handled specially by <i>keyfile<\/i> plugin are listed below. Refer to <b>nm-settings<\/b>(5) for all available settings and properties and their description.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Name aliases<\/b>. Some of the NetworkManager setting names are somewhat hard to type or remember. Therefore <i>keyfile<\/i> introduces aliases that can be used instead of the names.<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\"><i>setting name keyfile alias<\/i> <br \/> 802\u22123\u2212ethernet = ethernet <br \/> 802\u221211\u2212wireless = wifi <br \/> 802\u221211\u2212wireless\u2212security = wifi\u2212security<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a01.\u00a0bridge setting (section)<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-1192601.png\" alt=\"Image grohtml-1192601.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a02.\u00a0infiniband setting (section)<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-1192602.png\" alt=\"Image grohtml-1192602.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a03.\u00a0ipv4 setting (section)<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-1192603.png\" alt=\"Image grohtml-1192603.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a04.\u00a0ipv6 setting (section)<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-1192604.png\" alt=\"Image grohtml-1192604.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a05.\u00a0serial setting (section)<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-1192605.png\" alt=\"Image grohtml-1192605.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a06.\u00a0vpn setting (section) <br \/> \u00a0 \u00a0<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-1192606.png\" alt=\"Image grohtml-1192606.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a07.\u00a0wifi\u2212p2p setting (section)<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-1192607.png\" alt=\"Image grohtml-1192607.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a08.\u00a0802\u22123\u2212ethernet setting (section)<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-1192608.png\" alt=\"Image grohtml-1192608.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a09.\u00a0802\u221211\u2212wireless setting (section)<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-1192609.png\" alt=\"Image grohtml-1192609.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a010.\u00a0wpan setting (section)<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-11926010.png\" alt=\"Image grohtml-11926010.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Secret flags<\/b> <br \/> Each secret property in a NetworkManager setting has an associated <i>flags<\/i> property that describes how to handle that secret. In the <i>keyfile<\/i> plugin, the value of <i>\u2212flags<\/i> variable is a decimal number (0 \u2212 7) defined as a sum of the following values:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 0 \u2212 (NM owned) \u2212 the system is responsible for providing and storing this secret.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 1 \u2212 (agent\u2212owned) \u2212 a user\u2212session secret agent is responsible for providing and storing this secret; when it is required, agents will be asked to provide it.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 2 \u2212 (not\u2212saved) \u2212 this secret should not be saved but should be requested from the user each time it is required.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 4 \u2212 (not\u2212required) \u2212 in some situations it cannot be automatically determined that a secret is required or not. This flag hints that the secret is not required and should not be requested from the user.<\/font><\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/NetworkManager\/system\u2212connections\/*<\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>nm-settings<\/b>(5), <b>nm-settings-ifcfg-rh<\/b>(5), <b>NetworkManager<\/b>(8), <b>NetworkManager.conf<\/b>(5), <b>nmcli<\/b>(1), <b>nmcli-examples<\/b>(7)<\/font><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">GLib key file format<\/font><\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/developer.gnome.org\/glib\/stable\/glib-Key-value-file-parser.html#glib-Key-value-file-parser.description<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  nm-settings-keyfile \u2212 Description of keyfile settings plugin <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,1586],"class_list":["post-4651","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-nm-settings-keyfile"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4651"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4651\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}