I.MX6 busybox set hosname and login with root

來源:互聯網
上載者:User

標籤:

/************************************************************************** *            I.MX6 busybox set hosname and login with root * 聲明: *     搭busybox檔案系統,設定裝置名稱,使用root登入,無需密碼。 *  * *                                       2016-1-16 深圳 南山平山村 曾劍鋒 *************************************************************************/一、參考文檔:    1. Linux 檔案系統啟動過程及 login 的實現        http://read.pudn.com/downloads151/ebook/656465/Linux_init_program_intro.pdf    2. 用Busybox製作嵌入式Linux的檔案系統        http://www.jiancool.com/article/6782467490/    3. busybox 檔案系統 etc目錄,登陸 login,密碼 password,shadow        http://blog.csdn.net/lanmanck/article/details/5218438    4. 【原】解決PS1的顯示問題,busybox的/u /h特殊字元解析問題        http://blog.csdn.net/lanmanck/article/details/4360431二、配置內容:    1、cat /etc/inittab        ......        ttymxc0::once:-/bin/login           # 採用登入的方式        ......    2. cat /etc/passwd                      # 設定root使用者無密碼        ......        root::0:0:root:/root:/bin/ash        ......    3. cat /etc/group                       # 設定使用者和組        ......        root:x:0:root        ......    4. cat /etc/hostname                    # 主機名稱        zengjf    4. cat /etc/init.d/rcS                  # 擷取主機名稱        ......        /bin/hostname -F /etc/hostname        ......    4. cat /etc/profile        ......        HOSTNAME=`/bin/hostname`            # 擷取主機名稱        PS1="[\[email protected]\u \w]\# "                 # 設定shell中的顯示效果        export PS1 HOSTNAME                 # 匯出為環境變數        ......        三、效果如下:    input:  USB OPTICAL MOUSE as /devices/platform/fsl-ehci.1/usb2/2-1/2-1.2/2-1.2:1.0/input/input4    generic-usb 0003:0000:0538.0001: input,hidraw0: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-fsl-ehci.1-1.2/input0    zengjf login: root    login[1427]: root login on ‘ttymxc0‘    [[email protected] ~]# cd /    [[email protected] /]# ls    bin         etc         linuxrc     mnt         root        sys         usr    dev         lib         lost+found  proc        sbin        tmp    [[email protected] /]# cd /etc/init.d    [[email protected] /etc/init.d]# ls    rcS    [[email protected] /etc/init.d]# 

 

I.MX6 busybox set hosname and login with root

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.