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