Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 04-28-2004, 04:26 AM   #1
LQ Newbie
Registered: Apr 2004
Location: Denmark
Distribution: Gentoo Linux
Posts: 1

Rep: Reputation: 0
Run script at login instead of bash


I'm trying to make a user named "backup" that, when logging in, automaticly runs a perl-script (the backup-rutines) instead of a bash shell.

I've done it by changing the /bin/bash in /etc/passwd to the perl-script. But the perl-script runs some tar-commands, and they won't work if not run thru a shell.

I can only make it work by changing passwd back to /bin/bash and then run the perl-script thru .bash_profile ... but this leaves a big security hole if the script is breaked.

Is there a way to solve this?

Frank Nørvig
Old 04-28-2004, 12:55 PM   #2
LQ Newbie
Registered: Apr 2004
Posts: 8

Rep: Reputation: 0
to run a script at start up put the path to it and any options you would send to it, in the file:


hope this helps

Old 04-28-2004, 02:31 PM   #3
LQ Newbie
Registered: Apr 2004
Posts: 20

Rep: Reputation: 0
shell script

try creating a shell script wrapper for your program and point to the wrapper in /etc/passwd.



triggering the backup by loging in is an interesting approach, but why don't you just run it in a cron job or kick it off manually?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Run my bash script as a daemon. jaimese Linux - Newbie 12 02-10-2011 03:28 PM
how to run one bash script from within another? babag Programming 9 04-28-2005 12:12 AM
bash login script bunnyknight13 Linux - Newbie 4 09-10-2004 08:02 PM
bash login script seanatis Programming 6 09-06-2004 08:00 AM
Trying to execute bash script upon login?? mr-d-2003 Linux - Newbie 4 10-30-2003 03:15 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:52 AM.

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