Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3474

Converting scripts to C that contain passwords

$
0
0
This isn't a question but more of a here's what I did as a possible way of using a password within a script.
In my case, my croned backups that run and encrypt tarball backup that I'll use a password to decrypt.

While it is possible to to place a password within the script, it's not a good idea for obvious reason.
What I have done in the past (and probably the recommended way) was to create a directory in /etc and chmod the directory so that only root can access the file within that contains the password for gpg to use.
I wanted to get away from that so my solution was to rewrite the script to a C program. Perhaps a bit out of the ordinary and of course, I save the source file off system.
Yes I know, then can be decompiled but that would mean someone taking the time to do all that. In the end, this is turning out to be a good working scenario for me.
This idea won't be for everyone but more of a possible way of using scripts that contain passwords on the system.

I would be curious on other ways folks are getting around the use of password within scripts.

Statistics: Posted by cds60601 — 2024-03-16 14:59 — Replies 3 — Views 86



Viewing all articles
Browse latest Browse all 3474

Trending Articles