LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-04-2007, 10:53 AM   #1
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
bash script to read password from roots home


Hello,

I have a bash script that backs up nightly some stuff to an ftp server. In the script though is a password in plain sight. I saw once a thread(cant find it again) on how to have a file in roots home with pass information then to just read/include that file into the script. Could someone be so kind as to point me in the right direction?

mtia

Last edited by lord-fu; 06-04-2007 at 10:54 AM.
 
Old 06-04-2007, 11:18 AM   #2
mvidberg
LQ Newbie
 
Registered: Jun 2007
Location: Ontario, Canada
Distribution: Ubuntu, Debian, CentOS
Posts: 28

Rep: Reputation: 16
You could run the script as root, then it would have access to it's own directory. Otherwise, you could chmod your root subdirs/files to be readable by group and make sure the account running the script is in that group.
 
Old 06-04-2007, 12:09 PM   #3
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Original Poster
Rep: Reputation: 30
Actually, I didn't think through what I was saying. I should just be able to read in the file. Sometimes I have to type before I think.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script to read CTRL+D panchosansa Programming 5 10-26-2006 03:25 AM
read write in bash script yhus Programming 6 09-18-2006 12:23 PM
Help with BASH script PLEASE READ!!! hroman Programming 7 10-08-2004 07:39 PM
problems with bash script read wedgeworth Programming 3 02-16-2004 08:29 AM
roots password expired. wlfdgcrkz Linux - Software 2 06-19-2003 06:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:02 PM.

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