duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Setting the PASSPHRASE inside the duplicity program


From: Charles Knowlton
Subject: Re: [Duplicity-talk] Setting the PASSPHRASE inside the duplicity program itself
Date: Mon, 26 Mar 2007 15:33:09 -0500

The reason I want the passphrase in the program itself so that if an intruder were to get into my server it wouldn't be easy for them do figure it out. If it is directly in the cron(I plan on running duplicity with cron) then the intruder could figure it out real easy compared to knowing that the passphrase is in the program itself
Thanks for helping me out.
Regards,
Charles Knowlton

On Mar 26, 2007, at 3:20 PM, Steven Willoughby wrote:

Charles Knowlton wrote:
How would I set the PASSPHRASE inside the duplicity program itself?

I'm not sure why you would want to do this instead of using the
environment variable.

I am looking at this section of code:

def get_passphrase():
"""Get passphrase from environment or, failing that, from user"""
try: return os.environ['PASSPHRASE']

All you need to do is:

def get_passphrase():
        """Get passphrase from environment or, failing that, from user"""
        try: return os.environ['PASSPHRASE']
        except KeyError: pass
if not globals.encryption: return "" # assume we don't need passphrase

        return "blarg"

The rest of the function would then no longer be necessary.

I had tried setting the variable pass1 = 'test'
but that didn't work. I got this error message:
File "/usr/bin/duplicity2", line 38
self_pass1 = "crap"
^
IndentationError: expected an indented block

I don't have a clue as to what it means and I don't know anything about Python.

Python is whitespace dependent. It cares about the number of spaces or
tabs at the beginning of each line as that is how it determines when a
function definition ends. The line that you changed should begin with
two tab characters.

Steven


_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]