Implement automatic logon to ARM-linux

Source: Internet
Author: User
Implementation of automatic logon to ARM-linux 1. preface when using embedded development in linux systems, devices often need to be automatically started, bypassing the linux login system. There are many methods. here I will talk about my own method to directly modify the source code of the login program: 2. update mingetty1. to the website http ://... implementation of automatic logon to ARM-linux 1. preface when using embedded development in linux systems, devices often need to be automatically started, bypassing the linux login system. There are many methods. here I will talk about my own method to directly modify the source code of the logged-on program: 2. update mingetty1. http://www.filewatcher.com/m/mingetty-1.07.tar.gz.13435-0.html Download mingetty-1.07.tar.gz 2. Unzip: tar-zxvf mingetty-1.07.tar.gz. Go to the decompressed Directory. 3. modify the code in mingetty. c and change the mingetty code in two steps. Char * logname, * s in row 352nd; changed to char * logname = "root", * s; comment the line 409-415/* if (autologin) {do_prompt (0 ); printf ("login: % s (automatic login) \ n", autologin); logname = autologin;} else while (logname = get_logname () = 0) /* do nothing * // *; */(4) modify makefileCC = arm-none-linux-gnueabi-gcc (5) compile and generate mingetty [root @ localhost mingetty-1.07] # make (6) update mingetty to copy the generated mingetty program to the mingetty source code change under the/sbin Directory of the root file system. 3. update login (1) to the website http://www.filewatcher.com/_/?q=util-linux-2.13-pre7.tar.bz2 Download source code (2) decompress the source package tar-xf util-linux-2.13-pre7.tar.bz2 decompressed folder for the util-linux-2.13-pre7, go to the decompressed folder where the login source code directory is util-linux-2.13-pre7/login-utilslogin-utils file does not exist make file, therefore, you need to compile your own command to generate login. (3) modify the code in login. c to change passwd_req = 1 in row 344 to passwd_req = 0. add the locale. h header file to the file # include (4) compile and generate login [root @ localhost login-utils] # arm-none-linux-gnueabi-gcc-o login. c .. /lib/setproctitle. c checktty. c-Wall-lcrypt-I .. /include/(6) update login to copy the generated login program to the/bin directory of the root file system. 4. change the inittab file to the final logon statement # S2: 2345: respawn:/sbin/getty 115200 ttyS2 in the file system/etc/inittab file to S2: 2345: respawn: /sbin/mingetty ttyS2 downloads the modified root file system to the system again, and logs on directly when the system starts. You do not need to enter the user name and password.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.