[Samba] samba-tool auth in scripts

L.P.H. van Belle belle at bazuin.nl
Wed Jan 9 10:42:28 UTC 2019

What you can do..

Create base 64 encrypted password.

echo "YourS3CreTPassW0rd!"|base64

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 ) 

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.



> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens 
> Jakob Lenfers via samba
> Verzonden: woensdag 9 januari 2019 10:57
> Aan: samba at lists.samba.org
> 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

More information about the samba mailing list