In the documentation for the Subscription Management Tool (SMT) for Suse repository management, there are 4 ways to register a client with the SMT server.
One of these is by running the clientSetup4SMT.sh script. The documentation does not explain any way to perform a silent installation using this script, but is there any way to achieve it?
In the source of the clientSetup4SMT.sh script the following line of documentation can be found:
Usage: $0 --host <hostname of the SMT server> [--fingerprint <fingerprint of server cert>] [--yes]
The two options --fingerprint
and --yes
are the options we need.
--fingerprint
is the CA certificate fingerprint. The CA certificate can be found on the SMT server at http://FQDN/smt.crt
(FQDN). Alternatively it can be accessed at /srv/www/htdocs/smt.crt
.
Getting the fingerprint from the server is most easily done by deliberately specifying an invalid fingerprint in the script's --fingerprint
option:
clientSetup4SMT.sh --host <hostname of the SMT server> --fingerprint 'somestring' --yes
This will return:
Server fingerprint: <actual server fingerprint> and given fingerprint: <wrong server fingerprint> do not match, not accepting cert. Abort.
Copy the server fingerprint and paste it into the command as so:
clientSetup4SMT.sh --host <hostname of the SMT server> --fingerprint '<actual server fingerprint>' --yes
The above command will run silently.