SAMBA - smb failed to start [Résolu]

Aconitt
Messages : 1
Inscription : 20 septembre 2016, 15:47

SAMBA - smb failed to start [Résolu]

Message par Aconitt » 20 septembre 2016, 16:02

Bonjour,
Je viens de me créer un petit serveur samba. Lorsque je veux lancer nmb, pas de soucis.
En revanche :

Code : Tout sélectionner

systemctl restart smb.service
plante en beauté :

Code : Tout sélectionner

Job for smb.service failed because the control process exited with error code. See "systemctl status smb.service" and "journalctl -xe" for details.
status smb :

Code : Tout sélectionner

[root@server ~]# systemctl status -l smb.service
● smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since mar 2016-09-20 15:36:13 CEST; 13min ago
  Process: 4524 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=255)
 Main PID: 4524 (code=exited, status=255)
   Status: "Starting process..."

sep 20 15:36:13 server systemd[1]: Starting Samba SMB Daemon...
sep 20 15:36:13 server systemd[1]: smb.service: Supervising process 4524 which is not our child. We'll most likely not notice when it exits.
sep 20 15:36:13 server systemd[1]: smb.service: main process exited, code=exited, status=255/n/a
sep 20 15:36:13 server systemd[1]: Failed to start Samba SMB Daemon.
sep 20 15:36:13 server systemd[1]: Unit smb.service entered failed state.
sep 20 15:36:13 server systemd[1]: smb.service failed.
journalctl :

Code : Tout sélectionner

[root@server ~]# journalctl -xe | grep smb
-- Subject: L'unité (unit) smb.service a commencé à démarrer
-- L'unité (unit) smb.service a commencé à démarrer.
sep 20 15:21:35 server systemd[1]: smb.service: Supervising process 3355 which is not our child. We'll most likely not notice when it exits.
sep 20 15:21:35 server systemd[1]: smb.service: main process exited, code=exited, status=255/n/a
-- Subject: L'unité (unit) smb.service a échoué
-- L'unité (unit) smb.service a échoué, avec le résultat failed.
sep 20 15:21:35 server systemd[1]: Unit smb.service entered failed state.
sep 20 15:21:35 server systemd[1]: smb.service failed.
sep 20 15:22:48 server sudo[3654]:     aure : TTY=pts/1 ; PWD=/home/aure ; USER=root ; COMMAND=/bin/systemctl restart smb
-- Subject: L'unité (unit) smb.service a commencé à démarrer
-- L'unité (unit) smb.service a commencé à démarrer.
sep 20 15:22:48 server systemd[1]: smb.service: main process exited, code=exited, status=255/n/a
-- Subject: L'unité (unit) smb.service a échoué
-- L'unité (unit) smb.service a échoué, avec le résultat failed.
sep 20 15:22:48 server systemd[1]: Unit smb.service entered failed state.
sep 20 15:22:48 server systemd[1]: smb.service failed.
sep 20 15:27:23 server sudo[4105]:     aure : TTY=pts/1 ; PWD=/home/aure ; USER=root ; COMMAND=/bin/systemctl restart smb
-- Subject: L'unité (unit) smb.service a commencé à démarrer
-- L'unité (unit) smb.service a commencé à démarrer.
sep 20 15:27:23 server systemd[1]: smb.service: Supervising process 4124 which is not our child. We'll most likely not notice when it exits.
sep 20 15:27:23 server systemd[1]: smb.service: main process exited, code=exited, status=255/n/a
-- Subject: L'unité (unit) smb.service a échoué
-- L'unité (unit) smb.service a échoué, avec le résultat failed.
sep 20 15:27:23 server systemd[1]: Unit smb.service entered failed state.
sep 20 15:27:23 server systemd[1]: smb.service failed.
sep 20 15:28:24 server polkitd[931]: Operator of unix-session:1 successfully authenticated as unix-user:aure to gain TEMPORARY authorization for action org.freedesktop.systemd1.manage-unit-files for system-bus-name::1.95 [systemctl enable smb.service] (owned by unix-user:aure)
sep 20 15:28:33 server polkitd[931]: Operator of unix-session:1 successfully authenticated as unix-user:aure to gain TEMPORARY authorization for action org.freedesktop.systemd1.reload-daemon for system-bus-name::1.95 [systemctl enable smb.service] (owned by unix-user:aure)
-- Subject: L'unité (unit) smb.service a commencé à démarrer
-- L'unité (unit) smb.service a commencé à démarrer.
sep 20 15:31:30 server systemd[1]: smb.service: Supervising process 4421 which is not our child. We'll most likely not notice when it exits.
sep 20 15:31:30 server systemd[1]: smb.service: main process exited, code=exited, status=255/n/a
-- Subject: L'unité (unit) smb.service a échoué
-- L'unité (unit) smb.service a échoué, avec le résultat failed.
sep 20 15:31:30 server systemd[1]: Unit smb.service entered failed state.
sep 20 15:31:30 server systemd[1]: smb.service failed.
-- Subject: L'unité (unit) smb.service a commencé à démarrer
-- L'unité (unit) smb.service a commencé à démarrer.
sep 20 15:36:13 server systemd[1]: smb.service: Supervising process 4524 which is not our child. We'll most likely not notice when it exits.
sep 20 15:36:13 server systemd[1]: smb.service: main process exited, code=exited, status=255/n/a
-- Subject: L'unité (unit) smb.service a échoué
-- L'unité (unit) smb.service a échoué, avec le résultat failed.
sep 20 15:36:13 server systemd[1]: Unit smb.service entered failed state.
sep 20 15:36:13 server systemd[1]: smb.service failed.
/var/log/samba :

Code : Tout sélectionner

[root@server samba]# cat smbd.log 
[2016/09/20 15:18:47.690741,  0] ../source3/auth/auth_util.c:757(get_guest_info3)
  SamInfo3_for_guest: Unable to locate guest account [smbguest]!
[2016/09/20 15:18:47.690765,  0] ../source3/auth/auth_util.c:826(make_new_session_info_guest)
  get_guest_info3 failed with NT_STATUS_NO_SUCH_USER
[2016/09/20 15:18:47.691105,  0] ../source3/smbd/server.c:1493(main)
  ERROR: failed to setup guest info.
[2016/09/20 15:18:58.592944,  0] ../source3/auth/auth_util.c:757(get_guest_info3)
  SamInfo3_for_guest: Unable to locate guest account [smbguest]!
[2016/09/20 15:18:58.592965,  0] ../source3/auth/auth_util.c:826(make_new_session_info_guest)
  get_guest_info3 failed with NT_STATUS_NO_SUCH_USER
[2016/09/20 15:18:58.592974,  0] ../source3/smbd/server.c:1493(main)
  ERROR: failed to setup guest info.
[2016/09/20 15:19:07.782243,  0] ../source3/auth/auth_util.c:757(get_guest_info3)
  SamInfo3_for_guest: Unable to locate guest account [smbguest]!
[2016/09/20 15:19:07.782263,  0] ../source3/auth/auth_util.c:826(make_new_session_info_guest)
  get_guest_info3 failed with NT_STATUS_NO_SUCH_USER
[2016/09/20 15:19:07.782273,  0] ../source3/smbd/server.c:1493(main)
  ERROR: failed to setup guest info.
[2016/09/20 15:21:35.416029,  0] ../source3/auth/auth_util.c:757(get_guest_info3)
  SamInfo3_for_guest: Unable to locate guest account [smbguest]!
[2016/09/20 15:21:35.416147,  0] ../source3/auth/auth_util.c:826(make_new_session_info_guest)
  get_guest_info3 failed with NT_STATUS_NO_SUCH_USER
[2016/09/20 15:21:35.416477,  0] ../source3/smbd/server.c:1493(main)
  ERROR: failed to setup guest info.
[2016/09/20 15:22:48.448948,  0] ../source3/auth/auth_util.c:757(get_guest_info3)
  SamInfo3_for_guest: Unable to locate guest account [smbguest]!
[2016/09/20 15:22:48.448969,  0] ../source3/auth/auth_util.c:826(make_new_session_info_guest)
  get_guest_info
Je suis encore débutant, mais je vois un no such user dans les logs.
J'ai créé mes utilisateur comme suit :

Code : Tout sélectionner

-> useradd <user>
-> passwd <user>
-> usermod -a -G smbgroup <user>
-> smbpasswd -a <user>
Mon smb.conf juste au cas ou :

Code : Tout sélectionner

[global]

workgroup = GROUP1
server string = server
hosts allow = 192.168.1. 127.
restrict anonymous = no
security = user
strict allocate = yes
encrypt passwords = yes
passdb backend = smbpasswd
syslog = 0
use sendfile = yes
max log size = 50
unix extensions = no
log file = /var/log/samba/%m.log
invalid users = root
socket options = TCP_NODELAY
map to guest = bad user
guest account = smbguest
load printers = yes
smb ports = 139
read only = no
allow insecure wide links = yes

[share]

available = yes
path = /share
max connections = 50
directory mode = 0750
create mode = 0750
follow symlinks = yes
wide links = yes
public = no
guest only = no
valid users = @smbgroup
writable = yes
browseable = yes
read only = no
Je reste à disposition pour toute info supplémentaire.
D'avance merci.
Dernière modification par Aconitt le 21 septembre 2016, 15:34, modifié 1 fois.

Beta-Pictoris
Messages : 898
Inscription : 07 janvier 2014, 21:48
Localisation : Angers, France

Re: SAMBA - smb failed to start

Message par Beta-Pictoris » 20 septembre 2016, 17:44

La base de comptes smbpasswd est dépassée.
Tu devrais utiliser la base tdbsam et la commande pdbedit.

Répondre