Bug 8785 - Provision script errors without --targetdir specified
Summary: Provision script errors without --targetdir specified
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Tools (show other bugs)
Version: unspecified
Hardware: All All
: P5 minor (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: samba4-qa@samba.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-29 15:19 UTC by Kev Latimer
Modified: 2012-03-01 10:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kev Latimer 2012-02-29 15:19:54 UTC
Provision using recent git (first encountered with 4.0.0alpha19-GIT-b6fcac6 but still present) produces an error when ran as per the Howto:

root@mydc:/# /usr/local/samba/sbin/provision --realm=mydomain.local --domain=MYDOMAIN --adminpass=password --server-role=dc
Traceback (most recent call last):
  File "/usr/local/samba/sbin/provision", line 262, in <module>
    useeadb=eadb, next_rid=opts.next_rid, lp=lp)
  File "/usr/local/samba/lib/python2.6/site-packages/samba/provision/__init__.py", line 1663, in provision
    eadb=useeadb, lp=lp, server_services=server_services)
  File "/usr/local/samba/lib/python2.6/site-packages/samba/provision/__init__.py", line 648, in make_smbconf
    shares["sysvol"] = os.path.join(global_settings["state directory"],
KeyError: 'state directory' 

Workaround exists whereby you need to specify the target directory, eg. --targetdir=/usr/local/samba (thanks Gianni L on samba-technical) but would expect this to default if not specified.
Comment 1 Matthias Dieter Wallnöfer 2012-02-29 16:45:29 UTC
I think it has to do with inconsistent handling of the "targetdir" argument.

Jelmer, is it possible for you to have a look or rather not?
Comment 2 Matthias Dieter Wallnöfer 2012-03-01 10:53:49 UTC
Should have been fixed in "master" (http://gitweb.samba.org/samba.git/?p=samba.git;a=commitdiff;h=00a5366fdbb58905ebc66bfe58e707a3b9c92b11).