start, stop and restart samba 4.1 service in opensuse 13.1 64 bit

I want to know how stop, start, restart the samba service in samba 4.1 as a DC, in the samba how to says that to start the service you just type samba as root, but what about if you want to restart the service, or stop it and start it again?

I asked this in the samba mail list and these are the answers

https://lists.samba.org/archive/samba/2013-December/177290.html

can anybody post an example script for opensuse 13.1 64 bit and samba 4.1.2?

how can I use this script to stop or restart the service without having to restart the server?

thanks

On 2013-12-07 23:36, Easgs wrote:

> can anybody post an example script for opensuse 13.1 64 bit and samba
> 4.1.2?

Why do you need a script?


systemctl start smb.service

as any other service in openSUSE.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

this is for samba 4 running as a AD DC

https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO#Starting_Your_Samba_AD_DC

I do have a bash script that does it all you can find here: S.A.C.T. - Samba Automated Configuration Tool - Version 1.06 - Blogs - openSUSE Forums

Thank You,

On 2013-12-08 00:56, Easgs wrote:
>
> this is for samba 4 running as a AD DC
>
> http://tinyurl.com/cmk7jtq

It doesn’t matter. All services in openSUSE are started the same:


systemctl start NAME_OF_SERVICE.service

If you type “systemctl start” and two tabs, you get the entire list of
available services.

“systemctl start” starts the service just once. If you want it to start
automatically on every boot, you use “enable” as action word.

In YaST you have a module named “Services Manager” where you can also
configure what services to start or not.

If this is not what you are asking about, please explain.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

killall samba
samba

On 2013-12-24 19:46, Easgs wrote:
>
> Code:
> --------------------
> killall samba
> samba
>
> --------------------

That’s not the openSUSE way.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” (Elessar))

I think there is not openSUSE way for doing it, since the version of samba 4 included in openSUSE can not be configured as an AD DC, so you have to compile from source.

On 2013-12-26 16:26, Easgs wrote:
>
> I think there is not openSUSE way for doing it, since the version of
> samba 4 included in openSUSE can not be configured as an AD DC, so you
> have to compile from source.

Of course there is. You just have to write the service files, or import and adapt from the openSUSE
samba package.

Killing the daemon your way maybe does not allow it to close orderly and properly.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” (Elessar))

I found that in the Samba_AD_DC_HOWTO

Samba AD DC HOWTO - SambaWiki