Access SMB Share from Ubuntu

Snowman001

Cadet
Joined
Oct 1, 2019
Messages
6
Hello guys,

I hate posting this as hasving searched so much i know the answer is out there, i just dont know what it is. In simple terms my whole freenas box has a single share at the moment which i mainly use from a number of Windows clients. As i experiment with Linux i guess this will take over, at the moment i have setup Proxmox and in an Ubuntu container i want to access my share for media. Based on what i have read it will be a share issue but i am unsure where to start here. Output of some commans i have read of the forums...

From Ubuntu

Code:
root@plex:~# sudo mount -t cifs //192.168.1.219/winshare /mnt/freenas
Password for root@//192.168.1.219/winshare:  *********
mount error(1): Operation not permitted


Code:
root@plex:~# sudo mount -t cifs //192.168.1.219/winshare /mnt/ -o username=payala
Password for payala@//192.168.1.219/winshare:  *********
mount error(1): Operation not permitted


Code:
root@plex:~# mount -t cifs //192.168.1.219/winshare /mnt/freenas -o username=payala,vers=2.0
Password for payala@//192.168.1.219/winshare:  *********
mount error(1): Operation not permitted


Code:
root@plex:~# smbclient -L 192.168.1.219
WARNING: The "syslog" option is deprecated
Enter WORKGROUP\root's password:

        Sharename       Type      Comment
        ---------       ----      -------
        winshare        Disk     
        IPC$            IPC       IPC Service (FreeNAS Server)
Reconnecting with SMB1 for workgroup listing.
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE
Failed to connect with SMB1 -- no workgroup available


Code:
root@plex:~# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        dns proxy = No
        log file = /var/log/samba/log.%m
        map to guest = Bad User
        max log size = 1000
        obey pam restrictions = Yes
        pam password change = Yes
        panic action = /usr/share/samba/panic-action %d
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        passwd program = /usr/bin/passwd %u
        server role = standalone server
        server string = %h server (Samba, Ubuntu)
        syslog = 0
        unix password sync = Yes
        usershare allow guests = Yes
        idmap config * : backend = tdb


[printers]
        browseable = No
        comment = All Printers
        create mask = 0700
        path = /var/spool/samba
        printable = Yes


[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers
root@plex:~# uname -a
Linux plex 5.0.15-1-pve #1 SMP PVE 5.0.15-1 (Wed, 03 Jul 2019 10:51:57 +0200) x86_64 x86_64 x86_64 GNU/Linux


From Freenas

smbstatus.jpg



permiss.jpg



I amssume this is something to do with permissions or the SMB2/SMB3 thing. Can you point me in ther rigfht direction please.

Regards
Paul
 

Attachments

  • smbstatus.jpg
    smbstatus.jpg
    90.6 KB · Views: 444
  • smbstatus.png
    smbstatus.png
    192.9 KB · Views: 457
  • permiss.jpg
    permiss.jpg
    20.6 KB · Views: 470

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
If you're new to promox and lxc containers, then to access SMB shares in conatiners you have basically two options:

1. mount the smb share on the promox host itself and use a bind mount to accees it within your container.
2. create a privileged container and use the feature options to enabled/allow CIFS mounts in the container. ( see container settings here: https://pve.proxmox.com/wiki/Linux_Container#pct_configuration )

Option 1 is considered more secure. You could add CIFS storage to your proxmox host via the webui (datacenter > storage > add)

For option 2, your container only needs cifs-utils installed to mount a smb share, not a samba server
 
Last edited:

Snowman001

Cadet
Joined
Oct 1, 2019
Messages
6
I ran these same codes in pve (host)and boom it worked, after hours wondering why i ciould not get it to work before. Thank you!!

I cant get option 1 to work but i will plug away at that now. Thank you again!
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
Also: what version of Ubuntu? I recently discovered that 16.04 doesn't autonegotiate SMB protocol version, and you have to specify the vers=3.0 option when mounting. 18.04 does autonegotiate, happily.
 

Snowman001

Cadet
Joined
Oct 1, 2019
Messages
6
Hello,

Ubuntu 18.04.

Kris was correct here, becasue i was using a container it does not work. An applicationin the host i belive blocks this.
 
Top