Restart CIFS by shell

Status
Not open for further replies.

Miro

Cadet
Joined
Nov 10, 2015
Messages
6
hello,
how can i restart cifs service by shell in freenas 9.3 ?

in freenas 8 i restart cifs by restart ix-samba, but in 9.3 it is not available.

please help.
thanks
 

Miro

Cadet
Joined
Nov 10, 2015
Messages
6
service samba_server restart

Why do you need to restart via CLI? I only do that about once per week, but I tend to do brain-dead things.[/QUOTE

[root@nas2 ~]# service samba_service restart
samba_service does not exist in /etc/rc.d or the local startup
directories (/etc/ix.rc.d /usr/local/etc/rc.d)
 

Miro

Cadet
Joined
Nov 10, 2015
Messages
6
i have encrypted drives and use geli attach to decrypt them. i can olny Access the share if i toggel on and off the cifs Service. so i am looking for a method to automate this procedure by cli in an Batch file.
 

Miro

Cadet
Joined
Nov 10, 2015
Messages
6
[root@nas2 ~]# service samba_server restart
Performing sanity check on Samba configuration: OK
Stopping winbindd.
Waiting for PIDS: 4536.
Stopping smbd.
Waiting for PIDS: 4532, 4532.
Stopping nmbd.
Waiting for PIDS: 4528.
Performing sanity check on Samba configuration: OK
Starting nmbd.
Starting smbd.
Starting winbindd.
[root@nas2 ~]#
 

Miro

Cadet
Joined
Nov 10, 2015
Messages
6
ok, but i can still not Access my drives. if i toggle the Service cifs by gui on and off i cann Access the share.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Try the following:

Code:
service samba_server stop
service ix-pre-samba restart
service samba_server start
service ix-post-samba restart
service mdnsd restart


Basically, I think you'll need to rerun ix-pre-samba before restarting CIFS (but it shouldn't be run when samba is running). "ix-pre-samba" generates SIDs that samba uses to make authentication work, and writes them to a database. The others are based on 'notifier.py' in the middleware. See here: https://github.com/freenas/freenas/blob/9.3.1-STABLE/gui/middleware/notifier.py
 
Last edited:
Status
Not open for further replies.
Top