This fails as registry.tdb is created with 0600 permissions. lmuelle@giles:~> net usershare list Failed to initialize the registry: WERR_ACCESS_DENIED lmuelle@giles:~> echo $? 0 giles:~ # net usershare list fonts
The first net call is performed as non root user while the second as root.
It's not just "net usershare list", as soon as "registry shares = yes" is set in the smb.conf, commands like bin/testparm -s -v fail also : bin/testparm -s -v | grep registry Load smb config files from /usr/local/samba3.6/lib/smb.conf Processing section "[forcesec]" Processing section "[homes]" Processing section "[jeremy]" Processing section "[space]" Processing section "[space1]" Processing section "[tmp]" Processing section "[tmp1]" Processing section "[printers]" Processing section "[print$]" tdb(unnamed): tdb_open_ex: could not open file /usr/local/samba3.6/var/locks/registry.tdb: Permission denied tdb(unnamed): tdb_open_ex: could not open file /usr/local/samba3.6/var/locks/registry.tdb: Permission denied regdb_init: Failed to open registry /usr/local/samba3.6/var/locks/registry.tdb (Permission denied) Failed to initialize the registry: WERR_ACCESS_DENIED error initializing registry configuration: SBC_ERR_BADFILE Error loading services.
Adding Michael Adams - we need to discuss the correct fix for this. We need read-only access to parts of the registry, but not all I think (aren't there some secrets stored in registry.tdb ?). Jeremy.