Buenas noches!! He tenido problema para iniciar correctamente el servicio samba4. El archivo samba4 lo tengo actualmente en el ruta: /etc/rc.d/init.d/samba4 cuando la pc inicia chequeo el status de samba4: systemctl status samba4
y este es el resultado: samba4.service - LSB: Bring up/down samba4 Loaded: loaded (/etc/rc.d/init.d/samba4) Active: active (running) since Fri 2015-11-27 00:36:44 AST; 1min 13s ago Process: 500 ExecStart=/etc/rc.d/init.d/samba4 start (code=exited, status=0/SUCCESS) CGroup: /system.slice/samba4.service ├─605 /usr/local/samba/sbin/samba ├─797 /usr/local/samba/sbin/samba ├─798 /usr/local/samba/sbin/samba ├─800 /usr/local/samba/sbin/samba ├─801 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─802 /usr/local/samba/sbin/samba ├─805 /usr/local/samba/sbin/samba ├─806 /usr/local/samba/sbin/samba ├─807 /usr/local/samba/sbin/samba ├─808 /usr/local/samba/sbin/samba ├─809 /usr/local/samba/sbin/samba ├─810 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─824 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─825 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─826 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground └─868 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.475966, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: File "/usr/local/samba/sbin/samba_dnsupdate", line 126, in get_credentialsNov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.476000, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: raise eNov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.476021, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: RuntimeError: kinit for SERVIDOR$@DOMINIO.LOCAL failed (Cannot contact any KDC for requested realm)Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.479672, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate:Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.507870, 0] ../source4/dsdb/dns/dns_update.c:294(dnsupdate_nameupdate_done)Nov 27 00:37:09 servidor samba[809]: ../source4/dsdb/dns/dns_update.c:294: Failed DNS update - NT_STATUS_ACCESS_DENIED
Entonces tengo que reiniciar el servicio samba4: systemctl restart samba4
y este es el resultado: samba4.service - LSB: Bring up/down samba4 Loaded: loaded (/etc/rc.d/init.d/samba4) Active: active (running) since Fri 2015-11-27 00:39:34 AST; 2min 21s ago Process: 2388 ExecStop=/etc/rc.d/init.d/samba4 stop (code=exited, status=0/SUCCESS) Process: 2404 ExecStart=/etc/rc.d/init.d/samba4 start (code=exited, status=0/SUCCESS) CGroup: /system.slice/samba4.service ├─2408 /usr/local/samba/sbin/samba ├─2410 /usr/local/samba/sbin/samba ├─2411 /usr/local/samba/sbin/samba ├─2412 /usr/local/samba/sbin/samba ├─2413 /usr/local/samba/sbin/samba ├─2414 /usr/local/samba/sbin/samba ├─2415 /usr/local/samba/sbin/samba ├─2416 /usr/local/samba/sbin/samba ├─2417 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2418 /usr/local/samba/sbin/samba ├─2419 /usr/local/samba/sbin/samba ├─2420 /usr/local/samba/sbin/samba ├─2421 /usr/local/samba/sbin/samba ├─2422 /usr/local/samba/sbin/samba ├─2425 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─2426 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2427 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2428 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground └─2430 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground Nov 27 00:39:32 servidor samba[2408]: samba: using 'standard' process modelNov 27 00:39:32 servidor samba[2408]: [2015/11/27 00:39:32.715945, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:32 servidor samba[2408]: STATUS=daemon 'samba' finished starting up and ready to serve connectionsNov 27 00:39:33 servidor winbindd[2425]: [2015/11/27 00:39:33.041108, 0] ../source3/winbindd/winbindd_cache.c:3245(initialize_winbindd_cache)Nov 27 00:39:33 servidor winbindd[2425]: initialize_winbindd_cache: clearing cache and re-creating with version number 2Nov 27 00:39:34 servidor winbindd[2425]: [2015/11/27 00:39:34.233813, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:34 servidor winbindd[2425]: STATUS=daemon 'winbindd' finished starting up and ready to serve connectionsNov 27 00:39:34 servidor smbd[2417]: [2015/11/27 00:39:34.322486, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:34 servidor smbd[2417]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsNov 27 00:39:34 servidor samba4[2404]: Starting samba4: [ OK ]Nov 27 00:39:34 servidor systemd[1]: Started LSB: Bring up/down samba4. Que estoy haciendo mal?? Notas: Estoy usando Centos 7Samba4.4 Este es el archivo samba4 para iniciar/parar/reiniciar/estatus del servicio samba4: #! /bin/bash # # samba4 Bring up/down samba4 service # # chkconfig: - 90 10 # description: Activates/Deactivates all samba4 interfaces configured to \ # start at boot time. # ### BEGIN INIT INFO # Provides: # Should-Start: # Short-Description: Bring up/down samba4 # Description: Bring up/down samba4 ### END INIT INFO # Source function library. . /etc/init.d/functions
if [ -f /etc/sysconfig/samba4 ]; then . /etc/sysconfig/samba4 fi
CWD=$(pwd) prog="samba4"
start() { # Attach irda device echo -n $"Starting $prog: " /usr/local/samba/sbin/samba sleep 2 if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then success $"samba4 startup"; else failure $"samba4 startup"; fi echo } stop() { # Stop service. echo -n $"Shutting down $prog: " killall samba sleep 2 if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then failure $"samba4 shutdown"; else success $"samba4 shutdown"; fi echo } status() { /usr/local/samba/sbin/samba --show-build }
# See how we were called. case "$1" in start) start ;; stop) stop ;; status) status irattach ;; restart|reload) stop start ;; *) echo $"Usage: $0 {start|stop|restart|status}" exit 1 esac
exit 0 José Fermín Francisco Ferreras Registered User #579535 (LinuxCounter.net)
/usr/local/ ?
-- Saludos Epe
El 27 nov 2015, a las 2:55 a.m., Fermin Francisco abcddo@yahoo.com escribió:
Buenas noches!! He tenido problema para iniciar correctamente el servicio samba4. El archivo samba4 lo tengo actualmente en el ruta: /etc/rc.d/init.d/samba4 cuando la pc inicia chequeo el status de samba4: systemctl status samba4
y este es el resultado: samba4.service - LSB: Bring up/down samba4 Loaded: loaded (/etc/rc.d/init.d/samba4) Active: active (running) since Fri 2015-11-27 00:36:44 AST; 1min 13s ago Process: 500 ExecStart=/etc/rc.d/init.d/samba4 start (code=exited, status=0/SUCCESS) CGroup: /system.slice/samba4.service ├─605 /usr/local/samba/sbin/samba ├─797 /usr/local/samba/sbin/samba ├─798 /usr/local/samba/sbin/samba ├─800 /usr/local/samba/sbin/samba ├─801 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─802 /usr/local/samba/sbin/samba ├─805 /usr/local/samba/sbin/samba ├─806 /usr/local/samba/sbin/samba ├─807 /usr/local/samba/sbin/samba ├─808 /usr/local/samba/sbin/samba ├─809 /usr/local/samba/sbin/samba ├─810 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─824 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─825 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─826 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground └─868 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.475966, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: File "/usr/local/samba/sbin/samba_dnsupdate", line 126, in get_credentialsNov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.476000, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: raise eNov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.476021, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: RuntimeError: kinit for SERVIDOR$@DOMINIO.LOCAL failed (Cannot contact any KDC for requested realm)Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.479672, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate:Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.507870, 0] ../source4/dsdb/dns/dns_update.c:294(dnsupdate_nameupdate_done)Nov 27 00:37:09 servidor samba[809]: ../source4/dsdb/dns/dns_update.c:294: Failed DNS update - NT_STATUS_ACCESS_DENIED
Entonces tengo que reiniciar el servicio samba4: systemctl restart samba4
y este es el resultado: samba4.service - LSB: Bring up/down samba4 Loaded: loaded (/etc/rc.d/init.d/samba4) Active: active (running) since Fri 2015-11-27 00:39:34 AST; 2min 21s ago Process: 2388 ExecStop=/etc/rc.d/init.d/samba4 stop (code=exited, status=0/SUCCESS) Process: 2404 ExecStart=/etc/rc.d/init.d/samba4 start (code=exited, status=0/SUCCESS) CGroup: /system.slice/samba4.service ├─2408 /usr/local/samba/sbin/samba ├─2410 /usr/local/samba/sbin/samba ├─2411 /usr/local/samba/sbin/samba ├─2412 /usr/local/samba/sbin/samba ├─2413 /usr/local/samba/sbin/samba ├─2414 /usr/local/samba/sbin/samba ├─2415 /usr/local/samba/sbin/samba ├─2416 /usr/local/samba/sbin/samba ├─2417 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2418 /usr/local/samba/sbin/samba ├─2419 /usr/local/samba/sbin/samba ├─2420 /usr/local/samba/sbin/samba ├─2421 /usr/local/samba/sbin/samba ├─2422 /usr/local/samba/sbin/samba ├─2425 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─2426 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2427 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2428 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground └─2430 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground Nov 27 00:39:32 servidor samba[2408]: samba: using 'standard' process modelNov 27 00:39:32 servidor samba[2408]: [2015/11/27 00:39:32.715945, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:32 servidor samba[2408]: STATUS=daemon 'samba' finished starting up and ready to serve connectionsNov 27 00:39:33 servidor winbindd[2425]: [2015/11/27 00:39:33.041108, 0] ../source3/winbindd/winbindd_cache.c:3245(initialize_winbindd_cache)Nov 27 00:39:33 servidor winbindd[2425]: initialize_winbindd_cache: clearing cache and re-creating with version number 2Nov 27 00:39:34 servidor winbindd[2425]: [2015/11/27 00:39:34.233813, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:34 servidor winbindd[2425]: STATUS=daemon 'winbindd' finished starting up and ready to serve connectionsNov 27 00:39:34 servidor smbd[2417]: [2015/11/27 00:39:34.322486, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:34 servidor smbd[2417]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsNov 27 00:39:34 servidor samba4[2404]: Starting samba4: [ OK ]Nov 27 00:39:34 servidor systemd[1]: Started LSB: Bring up/down samba4. Que estoy haciendo mal?? Notas: Estoy usando Centos 7Samba4.4 Este es el archivo samba4 para iniciar/parar/reiniciar/estatus del servicio samba4: #! /bin/bash # # samba4 Bring up/down samba4 service # # chkconfig: - 90 10 # description: Activates/Deactivates all samba4 interfaces configured to \ # start at boot time. # ### BEGIN INIT INFO # Provides: # Should-Start: # Short-Description: Bring up/down samba4 # Description: Bring up/down samba4 ### END INIT INFO # Source function library. . /etc/init.d/functions
if [ -f /etc/sysconfig/samba4 ]; then . /etc/sysconfig/samba4 fi
CWD=$(pwd) prog="samba4"
start() { # Attach irda device echo -n $"Starting $prog: " /usr/local/samba/sbin/samba sleep 2 if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then success $"samba4 startup"; else failure $"samba4 startup"; fi echo } stop() { # Stop service. echo -n $"Shutting down $prog: " killall samba sleep 2 if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then failure $"samba4 shutdown"; else success $"samba4 shutdown"; fi echo } status() { /usr/local/samba/sbin/samba --show-build }
# See how we were called. case "$1" in start) start ;; stop) stop ;; status) status irattach ;; restart|reload) stop start ;; *) echo $"Usage: $0 {start|stop|restart|status}" exit 1 esac
exit 0 José Fermín Francisco Ferreras Registered User #579535 (LinuxCounter.net) _______________________________________________ CentOS-es mailing list CentOS-es@centos.org https://lists.centos.org/mailman/listinfo/centos-es
No entendí tu pregunta Ernesto. José Fermín Francisco Ferreras Registered User #579535 (LinuxCounter.net)
El Viernes, 27 de noviembre, 2015 7:10:02, Ernesto Perez ernesto.perez@cedia.org.ec escribió:
/usr/local/ ?
-- Saludos Epe
El 27 nov 2015, a las 2:55 a.m., Fermin Francisco abcddo@yahoo.com escribió:
Buenas noches!! He tenido problema para iniciar correctamente el servicio samba4. El archivo samba4 lo tengo actualmente en el ruta: /etc/rc.d/init.d/samba4 cuando la pc inicia chequeo el status de samba4: systemctl status samba4
y este es el resultado: samba4.service - LSB: Bring up/down samba4 Loaded: loaded (/etc/rc.d/init.d/samba4) Active: active (running) since Fri 2015-11-27 00:36:44 AST; 1min 13s ago Process: 500 ExecStart=/etc/rc.d/init.d/samba4 start (code=exited, status=0/SUCCESS) CGroup: /system.slice/samba4.service ├─605 /usr/local/samba/sbin/samba ├─797 /usr/local/samba/sbin/samba ├─798 /usr/local/samba/sbin/samba ├─800 /usr/local/samba/sbin/samba ├─801 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─802 /usr/local/samba/sbin/samba ├─805 /usr/local/samba/sbin/samba ├─806 /usr/local/samba/sbin/samba ├─807 /usr/local/samba/sbin/samba ├─808 /usr/local/samba/sbin/samba ├─809 /usr/local/samba/sbin/samba ├─810 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─824 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─825 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─826 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground └─868 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.475966, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: File "/usr/local/samba/sbin/samba_dnsupdate", line 126, in get_credentialsNov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.476000, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: raise eNov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.476021, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: RuntimeError: kinit for SERVIDOR$@DOMINIO.LOCAL failed (Cannot contact any KDC for requested realm)Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.479672, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate:Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.507870, 0] ../source4/dsdb/dns/dns_update.c:294(dnsupdate_nameupdate_done)Nov 27 00:37:09 servidor samba[809]: ../source4/dsdb/dns/dns_update.c:294: Failed DNS update - NT_STATUS_ACCESS_DENIED
Entonces tengo que reiniciar el servicio samba4: systemctl restart samba4
y este es el resultado: samba4.service - LSB: Bring up/down samba4 Loaded: loaded (/etc/rc.d/init.d/samba4) Active: active (running) since Fri 2015-11-27 00:39:34 AST; 2min 21s ago Process: 2388 ExecStop=/etc/rc.d/init.d/samba4 stop (code=exited, status=0/SUCCESS) Process: 2404 ExecStart=/etc/rc.d/init.d/samba4 start (code=exited, status=0/SUCCESS) CGroup: /system.slice/samba4.service ├─2408 /usr/local/samba/sbin/samba ├─2410 /usr/local/samba/sbin/samba ├─2411 /usr/local/samba/sbin/samba ├─2412 /usr/local/samba/sbin/samba ├─2413 /usr/local/samba/sbin/samba ├─2414 /usr/local/samba/sbin/samba ├─2415 /usr/local/samba/sbin/samba ├─2416 /usr/local/samba/sbin/samba ├─2417 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2418 /usr/local/samba/sbin/samba ├─2419 /usr/local/samba/sbin/samba ├─2420 /usr/local/samba/sbin/samba ├─2421 /usr/local/samba/sbin/samba ├─2422 /usr/local/samba/sbin/samba ├─2425 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─2426 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2427 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2428 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground └─2430 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground Nov 27 00:39:32 servidor samba[2408]: samba: using 'standard' process modelNov 27 00:39:32 servidor samba[2408]: [2015/11/27 00:39:32.715945, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:32 servidor samba[2408]: STATUS=daemon 'samba' finished starting up and ready to serve connectionsNov 27 00:39:33 servidor winbindd[2425]: [2015/11/27 00:39:33.041108, 0] ../source3/winbindd/winbindd_cache.c:3245(initialize_winbindd_cache)Nov 27 00:39:33 servidor winbindd[2425]: initialize_winbindd_cache: clearing cache and re-creating with version number 2Nov 27 00:39:34 servidor winbindd[2425]: [2015/11/27 00:39:34.233813, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:34 servidor winbindd[2425]: STATUS=daemon 'winbindd' finished starting up and ready to serve connectionsNov 27 00:39:34 servidor smbd[2417]: [2015/11/27 00:39:34.322486, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:34 servidor smbd[2417]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsNov 27 00:39:34 servidor samba4[2404]: Starting samba4: [ OK ]Nov 27 00:39:34 servidor systemd[1]: Started LSB: Bring up/down samba4. Que estoy haciendo mal?? Notas: Estoy usando Centos 7Samba4.4 Este es el archivo samba4 para iniciar/parar/reiniciar/estatus del servicio samba4: #! /bin/bash # # samba4 Bring up/down samba4 service # # chkconfig: - 90 10 # description: Activates/Deactivates all samba4 interfaces configured to \ # start at boot time. # ### BEGIN INIT INFO # Provides: # Should-Start: # Short-Description: Bring up/down samba4 # Description: Bring up/down samba4 ### END INIT INFO # Source function library. . /etc/init.d/functions
if [ -f /etc/sysconfig/samba4 ]; then . /etc/sysconfig/samba4 fi
CWD=$(pwd) prog="samba4"
start() { # Attach irda device echo -n $"Starting $prog: " /usr/local/samba/sbin/samba sleep 2 if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then success $"samba4 startup"; else failure $"samba4 startup"; fi echo } stop() { # Stop service. echo -n $"Shutting down $prog: " killall samba sleep 2 if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then failure $"samba4 shutdown"; else success $"samba4 shutdown"; fi echo } status() { /usr/local/samba/sbin/samba --show-build }
# See how we were called. case "$1" in start) start ;; stop) stop ;; status) status irattach ;; restart|reload) stop start ;; *) echo $"Usage: $0 {start|stop|restart|status}" exit 1 esac
exit 0 José Fermín Francisco Ferreras Registered User #579535 (LinuxCounter.net) _______________________________________________ CentOS-es mailing list CentOS-es@centos.org https://lists.centos.org/mailman/listinfo/centos-es
Buenas noches!! Esta noche resolví el problema. El problema estaba en el script de inicio de samba4. Los sustituí por el que aparece en la web oficial de samba. https://wiki.samba.org/index.php/Samba4/InitScript
Aquí les presento el script que se encuentra en la web oficial: #!/bin/bash # # samba4 This shell script takes care of starting and stopping # samba4 daemons. # # chkconfig: - 58 74 # description: Samba 4.0 will be the next version of the Samba suite # and incorporates all the technology found in both the Samba4 alpha # series and the stable 3.x series. The primary additional features # over Samba 3.6 are support for the Active Directory logon protocols # used by Windows 2000 and above.
### BEGIN INIT INFO # Provides: samba4 # Required-Start: $network $local_fs $remote_fs # Required-Stop: $network $local_fs $remote_fs # Should-Start: $syslog $named # Should-Stop: $syslog $named # Short-Description: start and stop samba4 # Description: Samba 4.0 will be the next version of the Samba suite # and incorporates all the technology found in both the Samba4 alpha # series and the stable 3.x series. The primary additional features # over Samba 3.6 are support for the Active Directory logon protocols # used by Windows 2000 and above. ### END INIT INFO
# Source function library. . /etc/init.d/functions
# Source networking configuration. . /etc/sysconfig/network
prog=samba prog_dir=/usr/local/samba/sbin/ lockfile=/var/lock/subsys/$prog
start() { [ "$NETWORKING" = "no" ] && exit 1 # [ -x /usr/sbin/ntpd ] || exit 5
# Start daemons. echo -n $"Starting samba4: " daemon $prog_dir/$prog -D RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile return $RETVAL }
stop() { [ "$EUID" != "0" ] && exit 4 echo -n $"Shutting down samba4: " killproc $prog_dir/$prog RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $lockfile return $RETVAL }
# See how we were called. case "$1" in start) start ;; stop) stop ;; status) status $prog ;; restart) stop start ;; reload) echo "Not implemented yet." exit 3 ;; *) echo $"Usage: $0 {start|stop|status|restart|reload}" exit 2 esac
Despues de reiniciar el equipo y ejecutar el comando: systemctl status samba4.service Obtengo lo siguiente: [root@servidor ~]# systemctl status samba4.servicesamba4.service - LSB: start and stop samba4 Loaded: loaded (/etc/rc.d/init.d/samba4) Active: active (running) since Tue 2015-12-08 00:05:51 AST; 36s ago Process: 1074 ExecStart=/etc/rc.d/init.d/samba4 start (code=exited, status=0/SUCCESS) CGroup: /system.slice/samba4.service ├─1497 /usr/local/samba/sbin//samba -D ├─2119 /usr/local/samba/sbin//samba -D ├─2120 /usr/local/samba/sbin//samba -D ├─2121 /usr/local/samba/sbin//samba -D ├─2122 /usr/local/samba/sbin//samba -D ├─2123 /usr/local/samba/sbin//samba -D ├─2124 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2125 /usr/local/samba/sbin//samba -D ├─2126 /usr/local/samba/sbin//samba -D ├─2127 /usr/local/samba/sbin//samba -D ├─2128 /usr/local/samba/sbin//samba -D ├─2129 /usr/local/samba/sbin//samba -D ├─2130 /usr/local/samba/sbin//samba -D ├─2131 /usr/local/samba/sbin//samba -D ├─2132 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─2136 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─2137 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2138 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground └─2141 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground Dec 08 00:05:54 servidor samba[1497]: [2015/12/08 00:05:54.327969, 0] ../source4/smbd/server.c:484(binary_smbd_main)Dec 08 00:05:54 servidor samba[1497]: samba: using 'standard' process modelDec 08 00:05:54 servidor samba[1497]: [2015/12/08 00:05:54.437017, 0] ../lib/util/become_daemon.c:124(daemon_ready)Dec 08 00:05:54 servidor samba[1497]: STATUS=daemon 'samba' finished starting up and ready to serve connectionsDec 08 00:05:55 servidor winbindd[2132]: [2015/12/08 00:05:55.418842, 0] ../source3/winbindd/winbindd_cache.c:3245(initialize_winbindd_cache)Dec 08 00:05:55 servidor winbindd[2132]: initialize_winbindd_cache: clearing cache and re-creating with version number 2Dec 08 00:05:56 servidor winbindd[2132]: [2015/12/08 00:05:56.574831, 0] ../lib/util/become_daemon.c:124(daemon_ready)Dec 08 00:05:56 servidor winbindd[2132]: STATUS=daemon 'winbindd' finished starting up and ready to serve connectionsDec 08 00:05:56 servidor smbd[2124]: [2015/12/08 00:05:56.931881, 0] ../lib/util/become_daemon.c:124(daemon_ready)Dec 08 00:05:56 servidor smbd[2124]: STATUS=daemon 'smbd' finished starting up and ready to serve connections Espero que esto le sirva a otras personas que busquen la solución al problema. José Fermín Francisco Ferreras Registered User #579535 (LinuxCounter.net)
El Viernes, 27 de noviembre, 2015 21:03:56, Fermin Francisco abcddo@yahoo.com escribió:
No entendí tu pregunta Ernesto. José Fermín Francisco Ferreras Registered User #579535 (LinuxCounter.net)
El Viernes, 27 de noviembre, 2015 7:10:02, Ernesto Perez ernesto.perez@cedia.org.ec escribió:
/usr/local/ ?
-- Saludos Epe
El 27 nov 2015, a las 2:55 a.m., Fermin Francisco abcddo@yahoo.com escribió:
Buenas noches!! He tenido problema para iniciar correctamente el servicio samba4. El archivo samba4 lo tengo actualmente en el ruta: /etc/rc.d/init.d/samba4 cuando la pc inicia chequeo el status de samba4: systemctl status samba4
y este es el resultado: samba4.service - LSB: Bring up/down samba4 Loaded: loaded (/etc/rc.d/init.d/samba4) Active: active (running) since Fri 2015-11-27 00:36:44 AST; 1min 13s ago Process: 500 ExecStart=/etc/rc.d/init.d/samba4 start (code=exited, status=0/SUCCESS) CGroup: /system.slice/samba4.service ├─605 /usr/local/samba/sbin/samba ├─797 /usr/local/samba/sbin/samba ├─798 /usr/local/samba/sbin/samba ├─800 /usr/local/samba/sbin/samba ├─801 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─802 /usr/local/samba/sbin/samba ├─805 /usr/local/samba/sbin/samba ├─806 /usr/local/samba/sbin/samba ├─807 /usr/local/samba/sbin/samba ├─808 /usr/local/samba/sbin/samba ├─809 /usr/local/samba/sbin/samba ├─810 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─824 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─825 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─826 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground └─868 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.475966, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: File "/usr/local/samba/sbin/samba_dnsupdate", line 126, in get_credentialsNov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.476000, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: raise eNov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.476021, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate: RuntimeError: kinit for SERVIDOR$@DOMINIO.LOCAL failed (Cannot contact any KDC for requested realm)Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.479672, 0] ../lib/util/util_runcmd.c:328(samba_runcmd_io_handler)Nov 27 00:37:09 servidor samba[809]: /usr/local/samba/sbin/samba_dnsupdate:Nov 27 00:37:09 servidor samba[809]: [2015/11/27 00:37:09.507870, 0] ../source4/dsdb/dns/dns_update.c:294(dnsupdate_nameupdate_done)Nov 27 00:37:09 servidor samba[809]: ../source4/dsdb/dns/dns_update.c:294: Failed DNS update - NT_STATUS_ACCESS_DENIED
Entonces tengo que reiniciar el servicio samba4: systemctl restart samba4
y este es el resultado: samba4.service - LSB: Bring up/down samba4 Loaded: loaded (/etc/rc.d/init.d/samba4) Active: active (running) since Fri 2015-11-27 00:39:34 AST; 2min 21s ago Process: 2388 ExecStop=/etc/rc.d/init.d/samba4 stop (code=exited, status=0/SUCCESS) Process: 2404 ExecStart=/etc/rc.d/init.d/samba4 start (code=exited, status=0/SUCCESS) CGroup: /system.slice/samba4.service ├─2408 /usr/local/samba/sbin/samba ├─2410 /usr/local/samba/sbin/samba ├─2411 /usr/local/samba/sbin/samba ├─2412 /usr/local/samba/sbin/samba ├─2413 /usr/local/samba/sbin/samba ├─2414 /usr/local/samba/sbin/samba ├─2415 /usr/local/samba/sbin/samba ├─2416 /usr/local/samba/sbin/samba ├─2417 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2418 /usr/local/samba/sbin/samba ├─2419 /usr/local/samba/sbin/samba ├─2420 /usr/local/samba/sbin/samba ├─2421 /usr/local/samba/sbin/samba ├─2422 /usr/local/samba/sbin/samba ├─2425 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─2426 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2427 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─2428 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground └─2430 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground Nov 27 00:39:32 servidor samba[2408]: samba: using 'standard' process modelNov 27 00:39:32 servidor samba[2408]: [2015/11/27 00:39:32.715945, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:32 servidor samba[2408]: STATUS=daemon 'samba' finished starting up and ready to serve connectionsNov 27 00:39:33 servidor winbindd[2425]: [2015/11/27 00:39:33.041108, 0] ../source3/winbindd/winbindd_cache.c:3245(initialize_winbindd_cache)Nov 27 00:39:33 servidor winbindd[2425]: initialize_winbindd_cache: clearing cache and re-creating with version number 2Nov 27 00:39:34 servidor winbindd[2425]: [2015/11/27 00:39:34.233813, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:34 servidor winbindd[2425]: STATUS=daemon 'winbindd' finished starting up and ready to serve connectionsNov 27 00:39:34 servidor smbd[2417]: [2015/11/27 00:39:34.322486, 0] ../lib/util/become_daemon.c:124(daemon_ready)Nov 27 00:39:34 servidor smbd[2417]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsNov 27 00:39:34 servidor samba4[2404]: Starting samba4: [ OK ]Nov 27 00:39:34 servidor systemd[1]: Started LSB: Bring up/down samba4. Que estoy haciendo mal?? Notas: Estoy usando Centos 7Samba4.4 Este es el archivo samba4 para iniciar/parar/reiniciar/estatus del servicio samba4: #! /bin/bash # # samba4 Bring up/down samba4 service # # chkconfig: - 90 10 # description: Activates/Deactivates all samba4 interfaces configured to \ # start at boot time. # ### BEGIN INIT INFO # Provides: # Should-Start: # Short-Description: Bring up/down samba4 # Description: Bring up/down samba4 ### END INIT INFO # Source function library. . /etc/init.d/functions
if [ -f /etc/sysconfig/samba4 ]; then . /etc/sysconfig/samba4 fi
CWD=$(pwd) prog="samba4"
start() { # Attach irda device echo -n $"Starting $prog: " /usr/local/samba/sbin/samba sleep 2 if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then success $"samba4 startup"; else failure $"samba4 startup"; fi echo } stop() { # Stop service. echo -n $"Shutting down $prog: " killall samba sleep 2 if ps ax | grep -v "grep" | grep -q /samba/sbin/samba ; then failure $"samba4 shutdown"; else success $"samba4 shutdown"; fi echo } status() { /usr/local/samba/sbin/samba --show-build }
# See how we were called. case "$1" in start) start ;; stop) stop ;; status) status irattach ;; restart|reload) stop start ;; *) echo $"Usage: $0 {start|stop|restart|status}" exit 1 esac
exit 0 José Fermín Francisco Ferreras Registered User #579535 (LinuxCounter.net) _______________________________________________ CentOS-es mailing list CentOS-es@centos.org https://lists.centos.org/mailman/listinfo/centos-es