Ec2 login prompt script

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ec2 login prompt script
# 1  
Old 05-29-2013
Ec2 login prompt script

Hey guys, trying to create a script that will run in the background until a user logs in and then present them with different options to proceed further.
It is on an Ubuntu 10.04 Amazon ec2 system.
The system runs 24/7 as it is and just needs to feed the prompt to whoever logs in.
Is this possible using just bash and native unix functions?
# 2  
Old 05-30-2013
You can designate any executable as login shell for a user. Create a script presenting and executing these functions you talked about, then put it in "/etc/passwd" as login shell for this user. It will be started when the user logs in and whe he leaves the script he will be automatically logged out.

I hope this helps.

This User Gave Thanks to bakunin For This Post:
# 3  
Old 05-30-2013
The custom login shell in /etc/passwd suits for a kiosk system where the user may not break out to the shell prompt.
For an initial script ending in a shell prompt /etc/profile is the right place. Most Linux distros have code there that run scripts in /etc/profile.d/ - you can simply add your script there.
This User Gave Thanks to MadeInGermany For This Post:
# 4  
Old 05-31-2013
Lifesavers, cheers guys.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Only get login prompt and nothing else

When I login as root or any user it prompts for the Login again. never prompts for password.login: root Login incorrect login: Does not matter what user login I try I get the same response (3 Replies)
Discussion started by: KMRWHUNTER
3 Replies

2. HP-UX

Not getting prompt after login

Hi, I'm a normal user in hp-ux box. today i'm unable to get prompt after i successfully logged in into the hp-ux box. what could be the problem? what should should i check? (4 Replies)
Discussion started by: sam_bd
4 Replies

3. Red Hat

Not getting login prompt

Hi, we have a server that runs on redhat linux. It was working fine until last year and all of sudden we are not able to ssh on to that server. we are getting the ping response but not getting the login prompt when tried to connect via ssh. Port 22 is opened and i have tested it out using... (6 Replies)
Discussion started by: phanidhar6039
6 Replies

4. Shell Programming and Scripting

passing login details to htaccess login prompt

Hi, How i can pass the login details to the URL which is password protected with the htaccess using command line or script (perl,or shell,or php). Any help or hint appreciated. Thanks, SJ (4 Replies)
Discussion started by: SilvesterJ
4 Replies

5. Ubuntu

start service when get login prompt

Hi Team, I am using DRBL environment on Ubuntu. When my machine starts some times it's not starting lxdm & nslcd service. Because of that i didn't get graphic mode & also not able to authenticate user as nslcd is also stops. I have to login as root and restart these two services, then i am able... (0 Replies)
Discussion started by: paragnehete
0 Replies

6. Solaris

How to prompt for the new password during the first login

Hi All, I have created a new user. Using the below command I have created the user successfully. useradd -c "Test user" -d /tmp/test -g Testgroup -s /bin/ksh -u 601 Test I don't want to set the password using “passwd” command after creating a user. I want to prompt for the new... (2 Replies)
Discussion started by: kalpeer
2 Replies

7. Linux

delay getting ssh login prompt

Hi, We currently have a problem on a centos server when i try to ssh to it there is a significant delay in getting a login prompt. What would be the steps in troubleshooting this issue? I have try to narrow down a possible network issue but cannot see anything obviously wrong in the routing table,... (4 Replies)
Discussion started by: borderblaster
4 Replies

8. UNIX for Dummies Questions & Answers

Login Prompt - Sol 10

Hello When I login as root - my prompt is # I want to change this and I understand the setting (PS1=) needs to go into a file called .profile, but I don't know where this file is for the root user. The root users home folder is / when I type env. Should I be creating a home folder for the... (4 Replies)
Discussion started by: deedaz
4 Replies

9. UNIX for Dummies Questions & Answers

changing login prompt on redhat

Hi... Can anyone help! I am in dire need to change the "login:" prompt to "username:" any ideas? Thanks in advance :) (6 Replies)
Discussion started by: juilan
6 Replies

10. UNIX for Dummies Questions & Answers

No login prompt

Hi, I am not getting login prompt when connecting to the red hat linux 7.2 server from windows machine and i am unable to login to server, after giving username at login prompt cusor blinks, no respnse. I can able to login to server thro ssh. Pl can i know how to solve this problem. Very badly... (4 Replies)
Discussion started by: bache_gowda
4 Replies
Login or Register to Ask a Question

Featured Tech Videos