ClearOS Bug Tracker


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015841ClearOSapp-samba - Windows Networkingpublic2017-07-20 10:092020-03-03 02:31
Reporterdloper 
Assigned To 
PrioritylowSeveritytrivialReproducibilityalways
StatusclosedResolutionsuspended 
PlatformOSOS Version
Product Version7.3.1 
Target VersionFixed in Version 
Summary0015841: System fails to initialize the domain with missing NIC
DescriptionThe Windows Networking module will not initialize if an interface is missing.

The initialization system should detect this condition and throw an exception early if /etc/samba/smb.conf contains 'interfaces = lo' only or 'interfaces = '
Steps To ReproduceOn a new system, configure the networking for gateway mode and configure from the External interface.

For the LAN interface, configure on DHCP and NEVER have it connected to a DHCP server source (ie. unconfigured)

Install and configure the accounts manager, OpenLDAP. Attempt to initialize the system. The /var/log/system log will have a similar log:

Jul 20 11:33:27 localhost samba: initializing Samba system
Jul 20 11:33:27 localhost samba: setting winadmin password
Jul 20 11:33:27 localhost samba: setting netbios name and workgroup: MyServer - TESTDOM
Jul 20 11:33:28 localhost samba: setting mode to PDC
Jul 20 11:33:28 localhost samba: storing LDAP credentials
Jul 20 11:33:28 localhost samba: starting Samba services for net calls
Jul 20 11:33:38 localhost events: accounts - event occurred
Jul 20 11:33:38 localhost events: accounts - triggered hook: accounts
Jul 20 11:34:59 localhost engine: exception: error: /usr/clearos/apps/base/libraries/Shell.php (227): Command execution failed.
Jul 20 11:34:59 localhost engine: exception: debug backtrace: /usr/clearos/apps/base/libraries/Daemon.php (598): execute
Jul 20 11:34:59 localhost engine: exception: debug backtrace: /usr/clearos/apps/samba/libraries/OpenLDAP_Driver.php (623): set_running_state
Jul 20 11:34:59 localhost engine: exception: debug backtrace: /usr/sbin/app-samba-initialize (161): initialize_samba_as_master_or_standalone

If running the init from command line you will get:

[root@gateway mode]# /usr/sbin/app-samba-initialize
Server name (e.g. SERVER1): MyServer
Password: The following settings will be used to set up the Samba Directory

Mode: master
Domain:
Server name: MyServer
Password: *********

Setting stored password for "cn=manager,ou=Internal,dc=testdom,dc=lan" in secrets.tdb
Secret stored
Redirecting to /bin/systemctl start nmb.service
Job for nmb.service failed because a timeout was exceeded. See "systemctl status nmb.service" and "journalctl -xe" for details.
PHP notice: Undefined index: line - /usr/clearos/apps/samba_common/libraries/Samba.php (2728)
Setting stored password for "cn=manager,ou=Internal,dc=testdom,dc=lan" in secrets.tdb
Secret stored
Redirecting to /bin/systemctl start nmb.service
Job for nmb.service failed because a timeout was exceeded. See "systemctl status nmb.service" and "journalctl -xe" for details.
Fatal - uncaught exception: exception 'clearos\apps\base\Engine_Exception' with message 'Command execution failed.' in /usr/clearos/apps/base/libraries/Shell.php:227
Stack trace:
#0 /usr/clearos/apps/base/libraries/Daemon.php(598): clearos\apps\base\Shell->execute('/sbin/service', 'nmb start', true, Array)
0000001 /usr/clearos/apps/samba/libraries/OpenLDAP_Driver.php(623): clearos\apps\base\Daemon->set_running_state(true)
0000002 /usr/sbin/app-samba-initialize(171): clearos\apps\samba\OpenLDAP_Driver->initialize_samba_as_master_or_standalone('MyServer', '', 'xxxxxxxx', false)
0000003 {main}

This is due to the fact that nmb cannot start without an interface:

[root@gateway ~]# systemctl status nmb
? nmb.service - Samba NMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/nmb.service; disabled; vendor preset: disabled)
   Active: activating (start) since Thu 2017-07-20 11:51:29 EDT; 55s ago
 Main PID: 19297 (nmbd)
   Status: "nmbd: No local IPv4 non-loopback interfaces available, waiting for interface ..."
   CGroup: /system.slice/nmb.service
           ??19297 /usr/sbin/nmbd
           ??19298 /usr/sbin/nmbd

Jul 20 11:51:29 gateway.example.com systemd[1]: Starting Samba NMB Daemon...
Jul 20 11:51:29 gateway.example.com systemd[1]: nmb.service: Supervising process 19297 which is not our child. We'll most likely not notice when it exits.
TagsNo tags attached.
Attached Files

- Relationships
duplicate of 0010441closed Add user warning if no LAN is configured 

-  Notes
(0013251)
NickH (developer)
2020-03-03 02:31

Migrated to https://gitlab.com/clearos/clearfoundation/app-samba/issues/19 [^]

- Issue History
Date Modified Username Field Change
2017-07-20 10:09 dloper New Issue
2017-07-20 11:21 user2 Relationship added duplicate of 0010441
2017-08-12 19:41 user2 Status new => confirmed
2017-08-18 10:03 user2 Target Version 7.4.0 => 7.4.0 Updates
2018-02-12 10:06 user2 Target Version 7.4.0 Updates =>
2020-03-03 02:31 NickH Note Added: 0013251
2020-03-03 02:31 NickH Status confirmed => closed
2020-03-03 02:31 NickH Resolution open => suspended