SOLVED freenas as a samba client

Status
Not open for further replies.

Zach Underwood

Dabbler
Joined
Jan 12, 2016
Messages
13
I would place this problem in a better spot but the forum system is not letting me.
version=FreeNAS-9.3-STABLE-201512121950

I am using this freenas has a file server for my group at work. Company IT dept has said that the server needs to be backed up to one for there systems. So they gave me a samba mount and a domain user access to the windows file share.

I can make it mount using the following
mount_smbfs -W d***.us -I 172.25.*.** -U svc.***samba //gvnas1/s*** /mnt/gvnas
and it will ask for a password.

I have tried to use /etc/fstab and /etc/nsmb.conf but cant seem to get it to work
/etc/nsmb.conf
[default]
workgroup=D***.us

[svc.***samba:gvnas1]
[gvnas1]
charsets=koi8-r:cp866
addr=gvnas1.d***.us
password=**********

/etc/fstab
//svc.***samba@gvnas1/s*** /mnt/gvnas smbfs rw,-I172.25.*.**, 0 0
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Don't mess with fstab. Just set a after post script running your mount command.
 

Zach Underwood

Dabbler
Joined
Jan 12, 2016
Messages
13
ok when I do the following
mount_smbfs -N -W d***.us -I 172.25.*.** -U svc.***samba //gvnas1/s*** /mnt/gvnas
I get an auth error pointing to a problem in /etc/nsmb.conf. Yes the password is entered right in nsmb.conf
 

ewhac

Contributor
Joined
Aug 20, 2013
Messages
177
If this is for copying a single archive file, or even for recursively copying directory trees to the external CIFS share, then I wouldn't even mess with a formal mount. I'd use smbclient to do the copy. It's reasonably scriptable, and you can furnish all the authentication credentials in local config files, or on the command line directly (not recommended; they'll show up in plaintext if anyone does a ps).
 

Zach Underwood

Dabbler
Joined
Jan 12, 2016
Messages
13
Yes this will be used for nightly backup (rsync) of the whole zfs data set to a ntfs/samba backup location. Why use smbclient over mount_smbfs?
 

ewhac

Contributor
Joined
Aug 20, 2013
Messages
177
Why use smbclient over mount_smbfs?
A philosophical preference of mine: "How can I do this without being root?" mount_smbfs/mount.cifs requires you to be root, whereas any user can run smbclient, so you can have an otherwise unprivileged user copy the files/archive over to the remote share. Root need not be involved in the copy process.

However, since you mentioned you're using rsync, that's a whole other kettle of fish, since rsync is designed for this use case, has its own network protocol, and can run over an SSH tunnel.
 

Zach Underwood

Dabbler
Joined
Jan 12, 2016
Messages
13
However, since you mentioned you're using rsync, that's a whole other kettle of fish, since rsync is designed for this use case, has its own network protocol, and can run over an SSH tunnel.
I cant do this. The mount is coming from a windows storage server 2008r2 managed by company IT and I only get a samba mount.
 

ewhac

Contributor
Joined
Aug 20, 2013
Messages
177
I cant do this. The mount is coming from a windows storage server 2008r2 managed by company IT and I only get a samba mount.
No problem; enable the rsync server on your FreeNAS box, give them a username/password, and let them do the rsync pulls on their preferred schedule. :smile:
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Last edited:
Status
Not open for further replies.
Top