![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Disable and Enable Backspace or Ctrl^H in vi | mobile01 | UNIX for Advanced & Expert Users | 5 | 11-24-2006 11:55 AM |
| terminating script with CTRL+D | sanchopansa | Shell Programming and Scripting | 12 | 10-26-2006 04:22 AM |
| Catching ctrl-C or ctrl-D | sendhilmani123 | Shell Programming and Scripting | 2 | 05-02-2006 05:02 PM |
| How to secure my script from Ctrl-C | jhansrod | Shell Programming and Scripting | 12 | 05-17-2005 11:38 AM |
| Script ctrl+c | newtounix | UNIX for Dummies Questions & Answers | 1 | 03-19-2001 05:23 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I think Perderabo has already given you the best solution possible (make the script the login shell). You could also "trap" some signals (signal 1 is <CTRL>-<C>, for instance, "man ksh" and search for "trap"), but Perderabos way is still better and more general.
bakunin |
|
||||
|
The reason why you don't get the desired result is you aren't carrying out Perderabos advice: "~/.profile" is a script which is run at some point during shell startup. This means that your Helpdesk user has still "/bin/sh" or something such configured as login shell in /etc/passwd. Having a shell execute a script at startup is not the same as having this scipt as shell.
Instead of renaming your script to ".profile" you should change the entry in /etc/passwd for the users login shell from (presumably) "/bin/ksh" to "/this/users/home/script.sh", and rename the script back to "script.sh". Don't forget to add this to the list of allowed login programs in /etc/security/login.cfg if you are on an AIX box and probably to something analogous if you are on another system. bakunin |
|
||||
|
Thanks for of your help.... Works like a charm
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|