ClearOS Bug Tracker


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006951ClearOSapp-samba - Windows Networkingpublic2016-01-11 08:112016-08-29 09:40
Reporterbchambers 
Assigned Touser2 
PrioritynormalSeveritymajorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version7.1.0 
Target VersionFixed in Version7.1.0 Updates 
Summary0006951: Samba fails to initialize
DescriptionCommunity Edition on 30 day verified repos (not sure if it makes a difference).

After some reports on the forums (https://www.clearos.com/clearfoundation/social/community/db-not-starting [^]) of issues, tried to duplicate this issue.

My Samba did not initialize...the logs indicated this command was failing:

/usr/clearos/sandbox/usr/bin/php /usr/sbin/app-samba-initialize -d CLEARSYSTEM -n MyServer -p supersecretpw

Stack trace showed:

Fatal - uncaught exception: exception 'clearos\apps\base\Engine_Exception' with message 'Command execution failed.' in /usr/clearos/apps/base/libraries/Shell.php:207
Stack trace:
#0 /usr/clearos/apps/samba/libraries/OpenLDAP_Driver.php(2382): clearos\apps\base\Shell->execute('/usr/bin/net', 'idmap secret '*...', true, Array)
0000001 /usr/clearos/apps/samba/libraries/OpenLDAP_Driver.php(591): clearos\apps\samba\OpenLDAP_Driver->_save_idmap_password()
0000002 /usr/sbin/app-samba-initialize(171): clearos\apps\samba\OpenLDAP_Driver->initialize_samba_as_master_or_standalone('MyServer', 'CLEARSYSTEM', 'supersecretpw', false)
0000003 {main}

Coming from:

/usr/bin/sudo /usr/bin/net idmap secret '*' 0XpHPLZPC0tjdL4C

Looks like either a bug or something changed in a samba upgrade...the new syntax is:

/usr/bin/sudo /usr/bin/net idmap set secret '*' 0XpHPLZPC0tjdL4C

In the samba library, function _save_idmap_password(), changing:

        $exitcode = $shell->Execute(self::COMMAND_NET, "idmap secret '*' $password", TRUE, $options);

To

        $exitcode = $shell->Execute(self::COMMAND_NET, "idmap set secret '*' $password", TRUE, $options);

And then going through the initialization stage then leads to success.



TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2016-01-11 08:11 bchambers New Issue
2016-01-11 17:53 user2 Status new => resolved
2016-01-11 17:53 user2 Fixed in Version => 7.1.0 Updates
2016-01-11 17:53 user2 Resolution open => fixed
2016-01-11 17:53 user2 Assigned To => user2
2016-08-29 09:40 user2 Status resolved => closed