source: vendor/3.6.0/source4/scripting/bin/machineaccountccache

Last change on this file was 740, checked in by Silvan Scherrer, 13 years ago

Samba Server: update vendor to 3.6.0

File size: 732 bytes
Line 
1#!/usr/bin/env python
2import optparse
3import sys
4
5# Find right directory when running from source tree
6sys.path.insert(0, "bin/python")
7
8
9import samba
10from samba import getopt as options
11from samba.credentials import Credentials
12parser = optparse.OptionParser("machineaccountccache <ccache name>")
13sambaopts = options.SambaOptions(parser)
14parser.add_option_group(sambaopts)
15parser.add_option_group(options.VersionOptions(parser))
16opts, args = parser.parse_args()
17
18if len(args) != 1:
19 parser.print_usage()
20 sys.exit(1)
21
22ccachename = args[0]
23
24lp_ctx = sambaopts.get_loadparm()
25
26creds = Credentials()
27
28creds.guess(lp_ctx)
29creds.set_machine_account(lp_ctx)
30creds.get_named_ccache(lp_ctx, ccachename)
Note: See TracBrowser for help on using the repository browser.