Bug 9841 - Missing directory /usr/local/samba/var
Summary: Missing directory /usr/local/samba/var
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.0.0rc5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-30 16:21 UTC by Stefan Kania
Modified: 2022-08-10 23:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Kania 2013-04-30 16:21:27 UTC
I just installed samba4 Version 4.0.5 from git during "samba domain provision" I got the following Error:
-----------
 root@samba4-1:~/samba4# samba-tool domain provision
Realm [EXAMPLE.NET]: EXAMPLE.NET
 Domain [EXAMPLE]: EXAMPLE
 Server Role (dc, member, standalone) [dc]: dc
 DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE)\ 
	      [SAMBA_INTERNAL]: BIND9_FLATFILE
 DNS forwarder IP address (write 'none' to disable forwarding)\
	      [127.0.0.1]: 192.168.123.102
Administrator password: 
Retype password: 
Looking up IPv4 addresses
Looking up IPv6 addresses
ERROR(<type 'exceptions.OSError'>): uncaught exception - [Errno 2] \ 
      No such file or directory: '/usr/local/samba/var/locks'
  File "/usr/local/samba/lib/python2.6/site-packages/samba/netcmd/__init__.py",\ 
	line 175, in _run
    return self.run(*args, **kwargs)
  File "/usr/local/samba/lib/python2.6/site-packages/samba/netcmd/domain.py",\ 
	line 398, in run
    use_rfc2307=use_rfc2307, skip_sysvolacl=False)
  File "/usr/local/samba/lib/python2.6/site-packages/samba/provision/__init__.py",\
	line 2019, in provision
    os.mkdir(paths.state_dir)
---------------
I found out, that the directory /usr/local/samba/var/ was not present. I createt the directory and "samba-tool domain provision" worked.
The same with:
/usr/local/samba/var/run/ and /usr/local/samba/var/lib are also missing.
After crating the directories everything worked fine.
Comment 1 Douglas Bagnall 2022-08-10 23:49:07 UTC
I think this has been fixed for quite a while.

Now provision uses directory_create_or_exists() that raises a ProvisioningError which samba-tool converts into a CommandError, which becomes a "nice" message.