LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-21-2020, 06:02 AM   #1
llsastre
LQ Newbie
 
Registered: Apr 2019
Location: Spain
Distribution: ubuntu server 16.04
Posts: 16

Rep: Reputation: Disabled
restart smbd and winbind failed


Hi,
I'm trying to join Ubuntu server 20.04 to old AD Windows 2003 server.
I follow this guide: https://elbinario.net/2019/02/13/int...ive-directory/

All seems ok until check status of smbd and winbind, that failed.

Code:
root@lxsvr:/home/adminserver# service smbd status
● smbd.service - Samba SMB Daemon
     Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2020-05-21 12:39:47 CEST; 5min ago
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
    Process: 1272 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)
    Process: 1290 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=255/EXCEPTION)
   Main PID: 1290 (code=exited, status=255/EXCEPTION)
     Status: "Starting process..."

May 21 12:39:46 lxsvr systemd[1]: Starting Samba SMB Daemon...
May 21 12:39:47 lxsvr systemd[1]: smbd.service: Main process exited, code=exited, status=255/EXCEPTION
May 21 12:39:47 lxsvr systemd[1]: smbd.service: Failed with result 'exit-code'.
May 21 12:39:47 lxsvr systemd[1]: Failed to start Samba SMB Daemon.

root@lxsvr:/home/adminserver# service winbind status
● winbind.service - Samba Winbind Daemon
     Loaded: loaded (/lib/systemd/system/winbind.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2020-05-21 12:40:07 CEST; 6min ago
       Docs: man:winbindd(8)
             man:samba(7)
             man:smb.conf(5)
    Process: 1301 ExecStart=/usr/sbin/winbindd --foreground --no-process-group $WINBINDOPTIONS (code=exited, status=1/FAILURE)
   Main PID: 1301 (code=exited, status=1/FAILURE)
     Status: "Starting process..."

May 21 12:40:07 lxsvr systemd[1]: Starting Samba Winbind Daemon...
May 21 12:40:07 lxsvr systemd[1]: winbind.service: Main process exited, code=exited, status=1/FAILURE
May 21 12:40:07 lxsvr systemd[1]: winbind.service: Failed with result 'exit-code'.
May 21 12:40:07 lxsvr systemd[1]: Failed to start Samba Winbind Daemon.
If I try to restart smbd service:
Code:
root@lxsvr:/home/adminserver# service smbd restart
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
And jounalctl -xe shows:
Code:
root@lxsvr:/home/adminserver# journalctl -xe
-- A new session with the ID 3 has been created for the user adminserver.
--
-- The leading process of the session is 855.
May 21 12:48:37 lxsvr systemd[1]: Started Session 3 of user adminserver.
-- Subject: A start job for unit session-3.scope has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit session-3.scope has finished successfully.
--
-- The job identifier is 667.
May 21 12:48:46 lxsvr sudo[1520]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
May 21 12:48:50 lxsvr sudo[1520]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
May 21 12:48:50 lxsvr sudo[1520]: adminserver : TTY=tty1 ; PWD=/home/adminserver ; USER=root ; COMMAND=/usr/bin/su
May 21 12:48:50 lxsvr sudo[1520]: pam_unix(sudo:session): session opened for user root by adminserver(uid=0)
May 21 12:48:50 lxsvr su[1527]: (to root) adminserver on tty1
May 21 12:48:50 lxsvr su[1527]: pam_unix(su:session): session opened for user root by adminserver(uid=0)
May 21 12:55:39 lxsvr systemd[1]: Starting Samba SMB Daemon...
-- Subject: A start job for unit smbd.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit smbd.service has begun execution.
--
-- The job identifier is 762.
May 21 12:55:39 lxsvr systemd[1]: smbd.service: Main process exited, code=exited, status=255/EXCEPTION
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit smbd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 255.
May 21 12:55:39 lxsvr systemd[1]: smbd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit smbd.service has entered the 'failed' state with result 'exit-code'.
May 21 12:55:39 lxsvr systemd[1]: Failed to start Samba SMB Daemon.
-- Subject: A start job for unit smbd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit smbd.service has finished with a failure.
--
-- The job identifier is 762 and the job result is failed.
-- A new session with the ID 3 has been created for the user adminserver.
--
-- The leading process of the session is 855.
May 21 12:48:37 lxsvr systemd[1]: Started Session 3 of user adminserver.
-- Subject: A start job for unit session-3.scope has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit session-3.scope has finished successfully.
--
-- The job identifier is 667.
May 21 12:48:46 lxsvr sudo[1520]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
May 21 12:48:50 lxsvr sudo[1520]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
May 21 12:48:50 lxsvr sudo[1520]: adminserver : TTY=tty1 ; PWD=/home/adminserver ; USER=root ; COMMAND=/usr/bin/su
May 21 12:48:50 lxsvr sudo[1520]: pam_unix(sudo:session): session opened for user root by adminserver(uid=0)
May 21 12:48:50 lxsvr su[1527]: (to root) adminserver on tty1
May 21 12:48:50 lxsvr su[1527]: pam_unix(su:session): session opened for user root by adminserver(uid=0)
May 21 12:55:39 lxsvr systemd[1]: Starting Samba SMB Daemon...
-- Subject: A start job for unit smbd.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit smbd.service has begun execution.
--
-- The job identifier is 762.
May 21 12:55:39 lxsvr systemd[1]: smbd.service: Main process exited, code=exited, status=255/EXCEPTION
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit smbd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 255.
May 21 12:55:39 lxsvr systemd[1]: smbd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit smbd.service has entered the 'failed' state with result 'exit-code'.
May 21 12:55:39 lxsvr systemd[1]: Failed to start Samba SMB Daemon.
-- Subject: A start job for unit smbd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit smbd.service has finished with a failure.
--
-- The job identifier is 762 and the job result is failed.
And another problem is for winbind service
Code:
root@lxsvr:/home/adminserver# service windbind restart
Failed to restart windbind.service: Unit windbind.service not found.
May someone help me about? If this services not run then I can't join to AD with order "net join ads -U administrador".

Thanks.
 
Old 05-21-2020, 08:00 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,339

Rep: Reputation: Disabled
The logs you posted are unfortunately completely devoid of any useful information; it's just systemd telling you about its internal workings, basically saying "I cannot start the smbd service because the executable won't start".

Samba has its own logfiles, but I'm not sure how they are handled in a systemd-based distribution. Perhaps the easiest way to figure out what's going on, is to simply start smbd manually and tell it to stay in the foreground and log to stderr:
Code:
smbd -i -d 2
Since you're logged in as root, this should work. Otherwise, the command has to be run via sudo.

The "-d 2" parameter specifies the debug level, which controls the amount of information logged. Increasing the value will result in a more detailed log.

You may also try running testparm. This program is part of samba, and its purpose is to parse smb.conf and report all settings and any errors. The command may or may not exist in your distribution, depending on whether or not the packagers have chosen to include testparm as part of the base samba package (see below).

As for winbind, the Ubuntu package maintainers have chosen to split samba into multiple packages, so you'll have to install winbind separately.
 
Old 05-22-2020, 05:30 AM   #3
rpenny
Member
 
Registered: Jul 2019
Posts: 82

Rep: Reputation: Disabled
OK, the page you followed has a lot of problems:

It shows this in /etc/hosts:

127.0.0.1 localhost
127.0.1.1 udsk-zb.zorrasbinarias.fem udsk-zb
10.5.2.212 dc2012-zb.zorrasbinarias.fem ZORRASBINARIAS dc2012-zb
10.5.2.212 zorrasbinarias.fem ZORRASBINARIAS

AD relies on DNS, so you do not need the DC lines in /etc/hosts, also you never put a netbios (ZORRASBINARIAS) name in /etc/hosts. I would replace the '127.0.1.1' with the computers actual IP.

All you need in /etc/krb5.conf is this:

[libdefaults]
default_realm = ZORRASBINARIAS.FEM
dns_lookup_realm = false
dns_lookup_kdc = true

The sample smb.conf is wrong, see here:
https://wiki.samba.org/index.php/Set..._Domain_Member
and here:
https://wiki.samba.org/index.php/Idmap_config_rid

I do not understand why the PAM files are backed up, it does nothing, also you do not have to run pam-auth-update.

He advises restarting the Samba daemons before carrying out the join, this is just wrong, you stop them before the join.

Then before the join, he gets you to kinit as Administrator, but the join doesn't use kerberos, you will just get asked for the Administrator password again.

Finally he advises making Administrator a sudo user, DO NOT DO THIS!
Add a line to smb.conf: username map = /etc/samba/user.map

And create /etc/samba/user.map containing this: !root = ZORRASBINARIAS\Administrator
 
Old 05-25-2020, 04:17 AM   #4
llsastre
LQ Newbie
 
Registered: Apr 2019
Location: Spain
Distribution: ubuntu server 16.04
Posts: 16

Original Poster
Rep: Reputation: Disabled
Following your advises, I've read docs on wiki.samba.org. Finally I have made a fresh install of Ubuntu server and I've configured all as wiki.samba.org tells. Now services are working fine.
But still can not join to domain. But this is another post.

Thanks for your help.

Llorenç
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] smbd bind to port 139 failed. tw1light Linux - Server 1 06-15-2011 06:41 PM
winbind --with-winbind-auth-challenge paul_mat Linux - Networking 0 09-27-2005 01:19 AM
Samba server ok at boot, later fails to bind to IP. smbd restart doesn't help. tisource Linux - Networking 1 04-09-2005 08:16 AM
have to restart winbind every morning mswati Linux - Software 3 11-25-2004 03:33 PM
smbd/service.c:set_current_service(56) chdir failed errors Medievalist Linux - Networking 0 09-02-2004 12:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration