summaryrefslogtreecommitdiffstats
path: root/client/ipa-client-samba.in
blob: 038636c6659555d651047d712f81ab1981479e43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/python3
#
# Copyright (C) 2019  FreeIPA Contributors see COPYING for license
#
# Configure the Samba suite to operate as domain member in IPA domain

import os
import sys
from ipaclient.install import ipa_client_samba

try:
    if not os.geteuid() == 0:
        sys.exit("\nMust be run as root\n")

    sys.exit(ipa_client_samba.run())
except SystemExit as e:
    sys.exit(e)
except RuntimeError as e:
    sys.exit(e)
except (KeyboardInterrupt, EOFError):
    sys.exit(1)