nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Shell Script To Run Program at Login

This is a discussion on Shell Script To Run Program at Login within the Shell scripting forums, part of the Development/Scripting category; Hi I am unable to create a script for login enabling the programme to run without giving the operator access ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Linux answers from nixCraft.


Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 14-04-2009, 06:21 PM
Junior Member
User
 
Join Date: Mar 2009
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gsb1bee is on a distinguished road
Default Shell Script To Run Program at Login

Hi I am unable to create a script for
login enabling the programme to run without giving the operator access to a shell.
Reply With Quote
  #2 (permalink)  
Old 14-04-2009, 07:07 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Try restricted shell and add program to ~/.bashrc or ~/.bash_profile.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 14-04-2009, 07:11 PM
Junior Member
User
 
Join Date: Mar 2009
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gsb1bee is on a distinguished road
Default

i am new to UNIX.
what i have done till now is i have created a menu driven programme and now i have to work with further concept that the application has its own status report enabling the programme to run without giving the operator access to a shell. Advancing the concept further the programme could be developed so that it is able to run with a ‘none interactive flag’ – enabling it’s execution to be automated with the resultant file e-mailed to a user perhaps once a day or once a week.
Reply With Quote
  #4 (permalink)  
Old 15-04-2009, 03:41 PM
Junior Member
User
 
Join Date: Mar 2009
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gsb1bee is on a distinguished road
Default mailx

hey hii i want to run a programme that is able to run with a non interactive flag- enabling it’s execution to be automated with the resultant file e-mailed to a user perhaps once a day or once a week

how can i do that anyone please help. Much appreciated
Reply With Quote
  #5 (permalink)  
Old 15-04-2009, 03:49 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

I'm sorry but I don't get you. Can you explain in more details?
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #6 (permalink)  
Old 15-04-2009, 03:53 PM
Junior Member
User
 
Join Date: Mar 2009
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gsb1bee is on a distinguished road
Default

Hi,
what i have done is i have developed a menu driven programme.
after that i need to make the application its own operator status report login enabling the programme to run without giving operator access to shell.
advancing the concept programme to be developed so that it is able to run with a ‘none interactive flag’ – enabling it’s execution to be automated with the resultant file e-mailed to a user perhaps once a day or once a week.

Did u get it?
Reply With Quote
  #7 (permalink)  
Old 16-04-2009, 07:38 PM
Junior Member
User
 
Join Date: Mar 2009
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gsb1bee is on a distinguished road
Default shell script

Hi,
what i have done is i have developed a menu driven programme.
after that i need to make the application its own operator status report login enabling the programme to run without giving operator access to shell.
advancing the concept programme to be developed so that it is able to run with a ‘none interactive flag’ – enabling it’s execution to be automated with the resultant file e-mailed to a user perhaps once a day or once a week.

can anyone give me an idea to do write such a script?
Reply With Quote
  #8 (permalink)  
Old 17-04-2009, 09:37 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You can't do that until and unless you write your own shell with restrictions in mind.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #9 (permalink)  
Old 17-04-2009, 02:20 PM
Junior Member
User
 
Join Date: Mar 2009
OS: Debian
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gsb1bee is on a distinguished road
Default

I am unable to get you what do you mean by restrictions, so what do i need to do then??
Reply With Quote
  #10 (permalink)  
Old 19-04-2009, 04:40 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Quote:
Originally Posted by gsb1bee View Post
I am unable to get you what do you mean by restrictions, so what do i need to do then??
You need to write your own shell like program in C which cannot be escaped by end user. Shell does not provides this kind of functions.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
Reply

Tags
.bashrc , linux , shell , shell scripting , unix


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
SSH - Passing Unix login passwords through shell scripts arulkumarr Shell scripting 4 27-08-2008 09:22 PM
Binary Conversion Of Shell Script (shell script compiler) chandanperl Shell scripting 3 29-07-2008 10:22 AM
shell script to send mail for each login. ephdia Shell scripting 2 27-11-2007 04:42 PM
How to change the login shell for Linux user chimu Getting started tutorials 0 26-01-2007 07:20 PM
How to pass shell variable to awk program Shell scripting 4 23-06-2006 05:11 AM


All times are GMT +5.5. The time now is 12:48 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38