[Solved]Samba server network access not working

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

[Solved]Samba server network access not working

Post by deepakdeshp »

Hello,
I am running Mint 18.2 with Samba . I configured Samba and am able to see the samba share from Windows. It asks me for network password and I am unable to make any progress.
Any help would be gratefully appreciated.

The smb.conf with comments stripped is

Code: Select all

[global]


   workgroup = Homegroup

        server string = %h server (Samba, Ubuntu)


;   wins server = w.x.y.z

   dns proxy = no


;   interfaces = 127.0.0.0/8 eth0

;   bind interfaces only = yes




   log file = /var/log/samba/log.%m

   max log size = 1000


   syslog = 0

   panic action = /usr/share/samba/panic-action %d



   server role = standalone server

   passdb backend = tdbsam

   obey pam restrictions = yes

   unix password sync = yes

   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

   pam password change = yes

   map to guest = bad user



;   logon path = \\%N\profiles\%U

;   logon drive = H:

;   logon script = logon.cmd

; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

; add group script = /usr/sbin/addgroup --force-badname %g


;   include = /home/samba/etc/smb.conf.%m

;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash


;   usershare max shares = 100

   usershare allow guests = yes


;[homes]
;   comment = Home Directories
;   browseable = no

;   read only = yes

;   create mask = 0700

;   directory mask = 0700

;   valid users = %S

;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes

;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
;   write list = root, @lpadmin
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba server network access not working

Post by altair4 »

I configured Samba and am able to see the samba share from Windows.
You have no share defined in smb.conf.

Maybe you created it with your file manager. Please post the output of the following command:

Code: Select all

net usershare info --long
Side Note: You have this listed in smb.conf:
workgroup = Homegroup
There is no such thing as a Homegroup in Linux so if you are trying to access it that way it will not work. I suppose you can call your workgroup homegroup but that's kinda confusing to me.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

Re: Samba server network access not working

Post by deepakdeshp »

altair4 wrote:
I configured Samba and am able to see the samba share from Windows.
You have no share defined in smb.conf.

Maybe you created it with your file manager. Please post the output of the following command:

Code: Select all

net usershare info --long
Side Note: You have this listed in smb.conf:
workgroup = Homegroup
There is no such thing as a Homegroup in Linux so if you are trying to access it that way it will not work. I suppose you can call your workgroup homegroup but that's kinda confusing to me.
Thank you very much Altair for your response.

Code: Select all

 net usershare info --long 
does not give any output.

My apologies for not giving the complete smb.conf. The lines I added in the original smb.conf are

Code: Select all

[share]
path = /home/girish/share
valid users = girish,aimcomp1
read only = No
create mask = 0777
directory mask = 0777
You are right and the windows workgroup is WORKGROUP . I changed it accordingly in th smb.conf file.
In spite of this there is no joy. Windows can see the share folder on Linux but cant browse or write to it.


Code: Select all

  tail log.nmbd

  Samba name server GIRISH is now a local master browser for workgroup WORKGROUP on subnet 192.168.0.115

  *****
  
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba server network access not working

Post by altair4 »

Did you add the valid users to the samba password database?

Code: Select all

sudo smbpasswd -a girish

Code: Select all

sudo smbpasswd -a aimcomp1
And did you allow aimcomp1 read / write access to the folder?

Code: Select all

ls -dl /home/girish/share
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
windyweather
Level 3
Level 3
Posts: 174
Joined: Wed Nov 09, 2011 8:34 pm
Location: Coos Bay, OR

Simple way to use Samba to Windows 10 systems

Post by windyweather »

I have Samba working very simply on LM 18.2.
Make sure all your Windows 10 systems are using WORKGROUP not another workgroup name. It used to work, but now fails if all systems are not WORKGROUP. I tried to change LM systems to the other workgroup name and that never worked either.
To allow read only sharing of files from an LM > WIn 10 and Win 10 > LM.
Use Software Manager to install Samba.
The auto-install thing from the sharing dialog fails. So just install it from Software manager first.
Don't edit any config files.
Navigate to Home and r click on your user directory. Choose Sharing to open the dialog.
Turn sharing on for your user folder. Add something to your username as the name of the share. For some reason I had trouble if the name was the same as my user name. But if you add something you'll be fine.
Choose Guest access.
Make sure that the LM system is on the same LAN segment - not separated by a router - as the Windows systems. Routers tend to filter out SMB and WINS protocol messages unless you mess with them.
When I do this my LM 18.2 systems can all see my Windows shares and read files and my Windows systems can see my LM shares and read them.
No editing config files. No messing with WINS or BIND, which I had to do in previous releases - 16, 17.
No messing with keyring passwords since this is guest access.
I've done this with several of my LM systems and they all share fine with my Windows 10 systems.
[Systems include LM 20 in VirtualBox / Win 10 Host on AMD Ryzen 3800x / AsRock A300 Ryzen 3200G]
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

Re: Samba server network access not working

Post by deepakdeshp »

Hello Altair,
Thank you very much .

Code: Select all

sudo smbpasswd -a girish
worked and I am able to access files to and from the Samba share
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

Re: Simple way to use Samba to Windows 10 systems

Post by deepakdeshp »

windyweather wrote:I have Samba working very simply on LM 18.2.
Make sure all your Windows 10 systems are using WORKGROUP not another workgroup name. It used to work, but now fails if all systems are not WORKGROUP. I tried to change LM systems to the other workgroup name and that never worked either.
To allow read only sharing of files from an LM > WIn 10 and Win 10 > LM.
Use Software Manager to install Samba.
The auto-install thing from the sharing dialog fails. So just install it from Software manager first.
Don't edit any config files.
Navigate to Home and r click on your user directory. Choose Sharing to open the dialog.
Turn sharing on for your user folder. Add something to your username as the name of the share. For some reason I had trouble if the name was the same as my user name. But if you add something you'll be fine.
Choose Guest access.
Make sure that the LM system is on the same LAN segment - not separated by a router - as the Windows systems. Routers tend to filter out SMB and WINS protocol messages unless you mess with them.
When I do this my LM 18.2 systems can all see my Windows shares and read files and my Windows systems can see my LM shares and read them.
No editing config files. No messing with WINS or BIND, which I had to do in previous releases - 16, 17.
No messing with keyring passwords since this is guest access.
I've done this with several of my LM systems and they all share fine with my Windows 10 systems.
Thank you for the detailed reply. But IMHO if you want to know what is happening behind the scene, configuring and tinkering the config files is the way to go. Otherwise LM also becomes just like the Windows black box.
Of course everybody will have his different opinion.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
Locked

Return to “Networking”