LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-16-2008, 03:33 PM   #1
livestrong23
LQ Newbie
 
Registered: Mar 2008
Posts: 5

Rep: Reputation: 0
Login command


On init runlevel 3, when we type "login", it shows the login prompt and undergoes the normal login process.

I want to write a script that would do invoke the login command when certain conditions happen. So typically, on bash shell script, I tried using "login" on my script. The problem with this is that when i try to run the script, the script stops responding, and I usually have to send a CTRL+ALT+DELETE to restart.

I tried testing by writing a very simple script with just only one line:

Code:
login;
When I run the above script, it also stops responding, and I have to go through the same process of rebooting the machine.

Is there a specific way regarding how to invoke the login command?

Any help regarding this will be appreciated.
 
Old 04-16-2008, 03:48 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Your script doesn't appear to exit which may be why it hangs. You could run it as "login &" which would background the script (though it would still run) or you could just put a second line reading "exit" (minus the quotes in both cases).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a command on login. thekillerbean Linux - General 6 07-04-2005 05:07 AM
command to login as different user true_atlantis Linux - Newbie 4 10-04-2004 04:55 PM
Remote Login command emailssent Linux - Newbie 11 09-24-2004 02:05 AM
Changin Graphical Login to command line login 3DLirio Linux - Newbie 2 10-16-2003 09:43 PM
when you login to the console/command....... Katrix Linux - Security 3 06-22-2001 02:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration