{"id":20753,"date":"2017-08-21T17:03:03","date_gmt":"2017-08-21T22:03:03","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=20753"},"modified":"2019-09-04T00:01:21","modified_gmt":"2019-09-04T05:01:21","slug":"log-in-as-an-admin-post-production","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/log-in-as-an-admin-post-production\/","title":{"rendered":"Log in as Admin Post-Production"},"content":{"rendered":"<h3>For mLinux versions 4.0 or higher:<\/h3>\n<p>Initial user-id and Password<\/p>\n<p>The administrator user-id is:\u00a0mtadm<\/p>\n<p>The password is: root<\/p>\n<p>To log in via ssh:<\/p>\n<pre>mtcdt:~$ ssh mtadm@192.168.2.1\r\nWarning: Permanently added '192.168.2.1' (ECDSA) to the list of known hosts.\r\nmtadm@nt1's password:<\/pre>\n<p>If this is a custom image, the password is found in the file password.txt in the top level directory (known as ${OEROOT}) in the\u00a0mLinux<sup>\u2122<\/sup> build. The value of MTADM_PASSWORD is the mtadm password.<\/p>\n<p><strong>NOTE:\u00a0<\/strong>The above credentials do <strong>NOT<\/strong> have root privileges. As a result, many commands may not work unless you use\u00a0<strong>sudo <\/strong>(for super user permissions).<\/p>\n<h3>Adding a 2nd administrator<\/h3>\n<pre>mtcdt:~$ sudo useradd -s \/bin\/bash -G sudo -m -c 'John Doe X7049' admin2<\/pre>\n<table>\n<caption>Fields of the useradd command in this example<\/caption>\n<tbody>\n<tr>\n<td>-s \/bin\/bash<\/td>\n<td>specifies the bash shell.<\/td>\n<\/tr>\n<tr>\n<td>-G sudo<\/td>\n<td>indicates that this user is in the\u00a0<i>sudo<\/i>\u00a0group and will be able to use the\u00a0<i>sudo<\/i>\u00a0command.<\/td>\n<\/tr>\n<tr>\n<td>-m<\/td>\n<td>indicates the home directory is to be created.<\/td>\n<\/tr>\n<tr>\n<td>-c &#8216;John Doe X7049&#8217;<\/td>\n<td>a comment in the \/etc\/passwd file.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Linux Tips for Root Privilege<\/h3>\n<p>The following does not work:<\/p>\n<pre>mtcdt:~$ sudo echo START_ON_BOOT=\"yes\" &gt;\/etc\/default\/hostapd<\/pre>\n<p>The directory \/etc\/default is owned by root and requires root privileges to create a file in the \/etc\/default directory. The &#8220;&gt;&#8221; is interpreted by the current shell, which does not have root privilege, so consequently the command does nothing. To create the file:<\/p>\n<pre>mtcdt:~$ sudo sh -c 'echo START_ON_BOOT=\"yes\" &gt;\/etc\/default\/hostapd'<\/pre>\n<p>A second way to accomplish this is to use the -s option:<\/p>\n<pre>mtcdt:~$ sudo -s\r\nPassword:                                                                                                                                                                    \r\nmtcdt:\/home\/mtadm# echo START_ON_BOOT=\"yes\" &gt;\/etc\/default\/hostapd\r\nmtcdt:\/home\/mtadm# exit\r\nmtcdt:\/etc\/default$<\/pre>\n<p>The &#8220;#&#8221; symbol indicates root privilege.<\/p>\n<p>To exit\u00a0<i>sudo -s<\/i>\u00a0either type &lt;ctrl-d&gt; or the word\u00a0<i>exit<\/i>. In this example, sudo solicits for the mtadm password.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For mLinux versions 4.0 or higher: Initial user-id and Password The administrator user-id is:\u00a0mtadm The password is: root To log in via ssh: mtcdt:~$ ssh mtadm@192.168.2.1 Warning: Permanently added &#8216;192.168.2.1&#8217; (ECDSA) to the list of known hosts. mtadm@nt1&#8217;s password: If this is a custom image, the password is found in the file password.txt in the [&hellip;]<\/p>\n","protected":false},"author":1478,"featured_media":0,"parent":9184,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-20753","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/20753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/1478"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=20753"}],"version-history":[{"count":9,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/20753\/revisions"}],"predecessor-version":[{"id":23661,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/20753\/revisions\/23661"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/9184"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=20753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}