Web lists-archives.com

Re: [Samba] samba-tool auth in scripts




What you can do..

Create base 64 encrypted password.

echo "YourS3CreTPassW0rd!"|base64
WW91clMzQ3JlVFBhc3NXMHJkIQo

Save this encrypted password in a password file.
And use it in any script where you need this password. 

/path_to/password_file.txt ( contains ) 
PASSWORD="WW91clMzQ3JlVFBhc3NXMHJkIQo"

To be added in you script:

source /path_to/password_file.txt
DB_PASSWORD="$(echo $PASSWORD|base64 -d)"

chmod 700 on the script, 400 on the password file.

Greetz, 

Louis


> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces@xxxxxxxxxxxxxxx] Namens 
> Jakob Lenfers via samba
> Verzonden: woensdag 9 januari 2019 10:57
> Aan: samba@xxxxxxxxxxxxxxx
> Onderwerp: [Samba] samba-tool auth in scripts
> 
> Hi,
> 
> I created a script to add DNS entries with samba-tool (for 
> LetsEncrypt,
> as a dehydrated hook.) Works fine, but I have the password for the
> dedicated user to do that in the script in the clear. I think I read
> somewhere something about doing it with kerberos, but I never used
> kerberos and don't know where to start. Is there any good way to be
> doing this?
> 
> Thanks,
> Jakob
> 
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
> 


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba