Jason Keltz
2021-Mar-25 14:02 UTC
[Samba] is it possible to define default -H and -k yes for samba-tool where required?
Hi.. Is there a way to make it so that "samba-tool" uses a default -H option, and -k yes where applicable via a default option in smb.conf? It would be really nice to be able to use samba-tool on any machine in the domain, but I have to remember to attach the -H ldap://dc1 and -k yes after the command *if it applies*. I can't just script? samba-tool to say, /opt/samba/bin/samba-tool $* -H ldap://dc1 -k yes because even the default "samba-tool" invocation which produces help wouldn't work then since it recognizes that -H and -k in this case are bogus: I tried this for fun: #!/bin/sh if [ $# -lt 2 ]; then ? /opt/samba/bin/samba-tool $* else ? /opt/samba/bin/samba-tool $* -H ldap://dc1 -k yes fi ... which does work a lot better, but still fails in many cases. It seems like something that would be useful. Jason.