From: Paul D. D. <pde...@ix...> - 2013-07-24 22:15:56
|
I assume most people don't use Samba on the Gumstix, but for those who do, I figure I'll post news of my ongoing sparring with it, in case someone else comes up against the same issues. By default, Samba keeps its usernames and passwords in a TDB database called passdb.tdb. However, the version of Samba included in the Gumstix Yocto stuff puts that file (and all the other .tdb files Samba uses) into /var/lock, which is linked to /var/volatiles/lock, in a RAM file system which disappears when the power is turned off. The solution seems to be to provide an alternate smb.conf file (which you pretty much have to do anyway) as part of the build, and add a "passdb backend" parameter to the [global] section to point to a nonvolatile location for the password file. My choice was to switch to the (deprecated) smbpasswd backend: passdb backend = smbpasswd and rely on the fact that the default location is /etc/samba/private/smbpasswd, which isn't volatile. But you should also be able to use the TDB backend with: passdb backend = tdbsam:/path/to/passdb.tdb according to the Samba docs. Once the server is running that way, you can execute something like "smbpasswd -a defaultusername" and give it a password, then copy the resulting passdb.tdb or smbpasswd file into the build system and include it as part of the build, if you want a built-in default username and password. -- Ciao, Paul D. DeRocco Paul mailto:pde...@ix... |