Samba - Old Trendnet Router Share

Issues related to applications and software problems
Post Reply
penguinpages
Posts: 15
Joined: 2015/07/21 13:58:05

Samba - Old Trendnet Router Share

Post by penguinpages » 2019/02/25 12:03:15

I have two servers. Trying to build out VM / container cluster.. but glusterfs needs a third arbiter volume.

I was planning on using my SMB share on the TEW-828DRU

Windows 10 workstation the shares work fine:
####
PS C:\> net use
New connections will be remembered.


Status Local Remote Network

-------------------------------------------------------------------------------
OK W: \\172.16.100.1\usb_A1 Microsoft Windows Network
OK X: \\172.16.100.1\usb_A2 Microsoft Windows Network
The command completed successfully.

PS C:\>
########

But I can't get the CentOS 7 (fully updated) client to connect to save my life. I am hoping it is too many coffee cups and I am missing something stupid.

I read various forums about adding samba services with smb user same name.. using version specifics when connecting. And still not working..



What I tried:
yum install smb smbclient -y
vi /etc/samba/smb.conf
####
[global]
workgroup = SAMBA
security = user
client use spnego = no
client ntlmv2 auth = no
passdb backend = tdbsam

printing = cups
printcap name = cups
load printers = yes
cups options = raw

[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes

[data]
comment = Data for VM and Containers
path = /data
valid users = %S, %D%w%S
browseable = Yes
read only = No
inherit acls = Yes
#####
systemctl start smb.service
systemctl enable smb.service
smbclient -L 172.16.100.1 -U cluster -m SMB2
smbtree -d3

# create login for mount on boot
vi /etc/samba/user
username=cluster
password=Password
smbpasswd -a cluster
New SMB password:
Retype new SMB password:
Added user cluster.

chmod 0400 /etc/samba/user
echo "//sw2.penguinpages.local/usb_A1 /media/sw2_usb_A1 cifs credentials=/etc/samba/user,noexec 0 0" >> /etc/fstab
mount -a
[root@thor ~]# smbclient -L 172.16.100.1 -U cluster
Enter SAMBA\cluster's password:

Sharename Type Comment
--------- ---- -------
IPC$ IPC
ADMIN$ IPC
print$ Disk
usb_A1 Disk
usb_A2 Disk
Reconnecting with SMB1 for workgroup listing.

Server Comment
--------- -------
SW2 TEW-828DRU

Workgroup Master
--------- -------
penguinpages


[root@thor ~]# smbclient //172.16.100.1/usb_A1 -U cluster
Enter SAMBA\cluster's password:
Try "help" to get a list of possible commands.
smb: \>
smb: \> dir
. DH 4096 Wed Jan 1 23:36:24 2014
.. DH 0 Mon Dec 31 11:00:00 1979
$RECYCLE.BIN D 0 Fri Nov 18 14:22:40 2016
forked-daapd.log A 157 Wed Jan 1 23:36:24 2014
iTunes D 4096 Wed Jan 1 06:09:07 2014
songs3.db A 38912 Wed Jan 1 23:36:24 2014
System Volume Information D 0 Sat Nov 19 01:50:26 2016
video D 4096 Sun Nov 20 10:18:06 2016
Error in dskattr: NT_STATUS_INVALID_NETWORK_RESPONSE
smb: \>q
mount -t cifs //172.16.100.1/usb_A1 /media/sw2_usb_A1
Password for root@//172.16.100.1/usb_A1: ********
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

penguinpages
Posts: 15
Joined: 2015/07/21 13:58:05

Re: Samba - Old Trendnet Router Share

Post by penguinpages » 2019/02/25 12:17:57

Bumping as I just figured it out via random googling and hit on resolution.

Baseline:

Windows 10 it works:
###
PS C:\> net use
New connections will be remembered.

There are no entries in the list.

PS C:\> net use \\172.16.100.1\usb_A1 /user:cluster
The password or user name is invalid for \\172.16.100.1\usb_A1.

Enter the password for 'cluster' to connect to '172.16.100.1':
The command completed successfully.

PS C:\> net use
New connections will be remembered.


Status Local Remote Network

-------------------------------------------------------------------------------
OK \\172.16.100.1\usb_A1 Microsoft Windows Network
The command completed successfully.
###

Linux it does not
[root@server1 ~]# mount.cifs //172.16.100.1/usb_A1 /media/sw2_usb_A1 -o user=cluster
Password for cluster@//172.16.100.1/usb_A1: ********
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@server1 ~]#

tail of /var/log/messages
Feb 25 07:08:56 server1 kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
Feb 25 07:08:56 server1 kernel: CIFS VFS: cifs_mount failed w/return code = -112


Increased logging on SMB client
[root@server1 ~]# echo 7 > /proc/fs/cifs/cifsFYI

### Fix... https://ubuntuforums.org/showthread.php?t=2375075
//172.16.100.1/usb_A1 on /media/sw2_usb_A1 type cifs (rw,relatime,vers=1.0,cache=strict,username=cluster,domain=WORKGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=172.16.100.1,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=61440,wsize=65536,echo_interval=60,actimeo=1)
[root@odin ~]#


It seems that -o <option>,<option>,<option> is the correct syntax

Why people can't include examples in man pages drives me nuts. No error that "-o username=foo vers=1.0 " where space is delimiter.. is not valid or errors.. what a waste of time :P

Post Reply