The login Process

 in
The beginning of it all....
A Synopsis of autologin

The first line tells the kernel how to run this program, in this case by letting the bash shell interpret it. The first exec line is a Bourne shell trick that lets a shell script change the source/destination of its standard input, standard output and standard error. We want to set file descriptors 0, 1 and 2 to refer to the terminal device as expected by login (and many other programs) when they run. The cat command displays the system's standard logon message. The shift command shifts the positional parameters to the shell script. Argument $1 is deleted, argument $2 becomes $1, argument $3 becomes $2 and so on. The last line executes the rest of the command line as a program. In this case, the login -f option performs the normal login procedure, with the -f option telling login not to bother with passwords.

Andy Vaught is currently a Ph.D. candidate in computational physics at Arizona State University and has been running Linux since 1.1. He enjoys flying with the Civil Air Patrol as well as skiing. He can be reached at andy@maxwell.la.asu.edu.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thank you

Hannes's picture

The awesomelyness!

Now I am one step closer to creating a Linux-based process control system

-

Hannes's picture

I forgot to mention that I really appreciate the detailed explanations in the article!

authentication

jayanta's picture

hi...i m doing my final year project on remote login in linux using java.
can i use "login" programme for that.
i have found shadowed password in /etc/shadow .
it is encrypted using SHA-512 .Can i encrypt password using SHA-512 and then match with encrypted password in shadow file.

Valued Artical

Anonymous's picture

Hi,

I have install damnlinux on dishonchip , i donot able find autologin script or command under sbin.

Praful

script

ChrisH's picture

Autologin is a script given by the author of this article:

http://www.linuxjournal.com/articles/lj/0058/3121/3121l1.html

Listing 1. autologin

#!/bin/bash
exec 0/dev/$1 2>&1
cat /etc/issue
shift
exec $*

I think, that here is a

patsch's picture

I think, that here is a little writing fault:
#!/bin/bash
exec 0/dev/$1 2>&1
cat /etc/issue
shift
exec $*

the line: exec 0/dev/$1 2>&1
should look like this:

exec 0&1

thanx for the great documentation : )

f* it should look like

Patsch's picture

f*
it should look like this:

"exec 0 < / dev / $ 1 2 > & 1"

( whithout the spaces in between... i don't know, why i can't post it like it should look like!!?? )

Wonderful Script

RaviShankar's picture

The Information given in the site was verymuch helpful for my automation. Thanks for the wonderful script.

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState