Help to hide shell terminal and run prompt program after ssh login for specified user


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help to hide shell terminal and run prompt program after ssh login for specified user
# 1  
Old 09-28-2011
Help to hide shell terminal and run prompt program after ssh login for specified user

Hey guys,

I have some task from my office to lock user on the specified directory after the user logged on using ssh. And then run prompt program to fill the required information. Yeah, just like an ATM system.

My question:
How could I do those?? AFAIK I have to edit the ~./bashrc. But the problem is it's only for several users.
And how to make an interactive shell prompt? Like an ATM prompt system.

Thanks for your attention.
# 2  
Old 09-29-2011
* write prompt program to fill the required information like a shell script or if your program already written with another language then try emulate your working enviroment.
* i assume you use a shell script then add the line ". $HOME/your_prompt_script" to your users's shell startup profile file (bash->. $HOME/.bash_profile , ksh -> $HOME/.profile ..... )
& maybe you must add "
Code:
trap '' SIGINT SIGQUIT SIGTSTP

" to your_prompt_script your script for restrict to interrupt before login to new shell.you can add other signals to trap command..

regards
ygemici
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Unable to login in ssh terminal

Hi guys when ever i tried to connect aix server in my institute through ssh terminal the pop is coming like network is unreachable .Am using MacBook air the other guys who are using putty software in windows they can easily login in tho the server through remotely . Is there any one can... (3 Replies)
Discussion started by: aashishb007
3 Replies

2. Solaris

Run commans as no login shell user

Hi All, I have problem running a command with another user who has no login shell the os is solaris 10 i am root and doing the following: su user -s /bin/bash "ls" no output .. no error messages if su - user i got No directory Please use CODE tags as required by forum... (2 Replies)
Discussion started by: BF_DEV
2 Replies

3. UNIX for Advanced & Expert Users

How do I remove or hide SunOS version/release from remote login prompt?

For any SunOS 5.XX release, it appears prior to the "login:" prompt (as if a "uname" command is run). Would anyone know where that initial display of SunOS release comes from upon a remote login and how I can stop if from displaying? Thank you (4 Replies)
Discussion started by: ssid61
4 Replies

4. Shell Programming and Scripting

Hide the output of spawn ssh user@server

Hi All, I have written one script, which is connecting 3 diffrent servers and executing script placed on those. It is smthing like: spawn ssh user@server1 expect "*? assword:" send "pw \r" expect "$" send " sh ./filename1 \r" expect "$" expect eof spawn ssh user@server2 expect "*?... (7 Replies)
Discussion started by: KDMishra
7 Replies

5. Shell Programming and Scripting

Limit a user's login prompt upon logon

Hey Am new to scripting in aix 5.3 I need to write a script to limit a user's logon prompt to an interactive menu based upon logon and nothing else. Any ideas much appreciated. :wall: (4 Replies)
Discussion started by: mills
4 Replies

6. Linux

How to open a gnome-terminal in specific workspace and run script within it automatically upon login

OK this is a bit messy. I run Fedora with gnome on a compiz desktop, I have a script (userstart) that opens my 'standard' environment for all my machines when I login. userstart flips to a specific workspace and then opens the required applications in that workspace then flips to the next... (2 Replies)
Discussion started by: Bashingaway
2 Replies

7. OS X (Apple)

How to prompt for login on OSX when starting Terminal

I was wondering if anyone can tell me how to log back in to unix after logging out. I have a MBPro. If I don't have the window close after exiting, then there is the phrase 'process completed' in brackets with a blinking cursor, but I can't type anything in. Is it also possible to start the... (4 Replies)
Discussion started by: Straitsfan
4 Replies

8. Solaris

expired password prompt at ssh login

Hi, I am using DSEE 6.3 to authenticate and authorize my Solaris 9 and 10 users. Everything works fine except password expiration. I use built-in global password policy for all users. The policy works well. However I could not find the right pam configuration in order to prompt users at ssh... (2 Replies)
Discussion started by: niyazi
2 Replies

9. UNIX for Dummies Questions & Answers

change user> to user@host> ssh prompt

Hi, I was wondering how to change the prompt for my ssh login. At the moment it is like user> while I'd like it to be as user@host> It is in the .bash_profile or .ssh ??? Thanks (2 Replies)
Discussion started by: pmasterkim
2 Replies

10. 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
Login or Register to Ask a Question