You are not logged in.

#1 2013-06-08 10:57:16

Janilson
Member
From: Recife-PE/Brazil
Registered: 2013-03-05
Posts: 55

[SOLVED] Samba Issue (Arch+Win8 workgroup)

Hi everyone.
It`s been like 3 months that I am trying to add my archlinux VM to my windows network. I have even used arch as my main box but i changed cuz I couldnt share anything.

I just created a workgroup in my windows 8 box and it gave me a password. Every windows machine, in order to get in this workgroup shall have this password.

What I have
In arch (virtualbox, installed on that windows  box) I have downloaded samba and nmap. I am using xfce4.
My windows can see my arch box(called archlinux)  in network sharing window, the way it does when it is a windows machine. But, when I try to acces it, I get an error message (could not access ARCHLINUX).
In my arch box, I see my windows machine, when I try to access it Thunar ask me for a user/domain/password information.
if I write my password in windows 8 box, I can access the folder, but I have to do it to every sub folder.

What I want
Just share files from my archbox with every win machines from my local network without knowing the windows login password of everyone in my house.
I suppose there`s some place where I can inform the workgroup passwd, like I do in windows

What I have done
https://wiki.archlinux.org/index.php/Sa … ng_a_share
https://wiki.archlinux.org/index.php/Sa … ing_a_user
-Installed gvfs-smb

And that is my smb.conf

[global]

# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
   server string = archlinux

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/%m.log

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Security mode. Most people will want user level security. See
# security_level.txt for details.
   security = user
   map to guest = Bad User

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
   local master = no

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
   wins support = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
   dns proxy = no 

#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

[publico]
   path = /home/Teste
   public = yes
   only guest = yes
   writable = yes
   printable = no
   browsable = yes
   share modes = yes

If you guys need any information please ask me, I really want it to work
Thanks

Last edited by Janilson (2013-06-17 14:09:46)

Offline

#2 2013-06-08 20:05:56

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 324

Re: [SOLVED] Samba Issue (Arch+Win8 workgroup)

I think you might be getting slightly confused here.

"workgroup" is the default name for a windows workgroup used in traditional sharing of file in a windows network which is also used in samba on linux to enable you to see the computers when connecting to a windows network.

However as of Windows 7 a new form of file sharing has been introduced for windows based networks that is called a "Homegroup" & as such when you use that interface you add folders/files to "Libraries" & once you have completed the selections & finish it you are presented with a password with which to use on other windows 7/8 pc's to join the "Homegroup"

Samba currently does not support the "homegroup" way of file sharing & thus to access your windows file shares you need to set them up using the old way prior to windows 7/8.
To do this browse to the folder you want to share on windows, right click, select properties, then sharing & then continue to create an old fashioned windows share.


ROG Strix (GD30CI) - Intel Core i5-7400 CPU - 32Gb 2400Mhz - GTX1070 8GB - AwesomeWM (occasionally XFCE, i3)

If everything in life was easy, we would learn nothing!
Linux User: 401820  Steam-HearThis.at-Last FM-Reddit

Offline

#3 2013-06-08 20:39:30

Janilson
Member
From: Recife-PE/Brazil
Registered: 2013-03-05
Posts: 55

Re: [SOLVED] Samba Issue (Arch+Win8 workgroup)

Thanks for answer t0m5k1. I did now as you've told me. I clicked on properties, sharing, etc. But, still arch ask me for a password.

So, I do have to know the password from a windows box I want to get the shared files? And... what about windows machines, how can it access my linux shared folder?
I do realize I am a newbie on samba, even after many days reading and trying I still couldn't. sad

Last edited by Janilson (2013-06-09 14:46:48)

Offline

#4 2013-06-10 08:56:41

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 324

Re: [SOLVED] Samba Issue (Arch+Win8 workgroup)

The username/password will be the one of the user sharing the files but if you do not want to use password based sharing follow this:

open start, click control panel, then "Network & Sharing Center", then click on  "change advanced sharing settings" here you will the settings for the 3 types of network, the one that is fully expanded is you current windows network type look through these setting & when you get to "Password Protected Sharing" set that to off (note: you may or may not need to reboot)

Once you get windows setup to share what you want & you can access the files on linux you are halfway there next your focus is on the configured linux samba shares.
The latest samba has a config file check tool to help us & advise us based on what we put in the config file, keep referring to the arch & samba wiki's as well as the link I provide below.

I have just run the samba-tool on your config here is the output + revised config:

┌─(t0m5k1@b0x)-(1563/pts/1)-(10:38am:10/06/13)-
└─>(%:~)
└─>> sudo samba-tool testparm    
Unknown parameter encountered: "share modes"
Ignoring unknown parameter "share modes"
Press enter to see a dump of your service definitions
 <enter>

# Global parameters
[global]
	workgroup = WORKGROUP
	server string = archlinux
	security = USER
	map to guest = Bad User
	guest account = pcguest
	log file = /var/log/samba/%m.log
	max log size = 50
	local master = No
	dns proxy = No
	wins server = 127.0.0.1
	wins support = Yes

[homes]
	comment = Home Directories
	read only = No
	browseable = No

[publico]
	path = /home/Teste
	read only = No
	guest only = Yes
	guest ok = Yes

save your current config under a different name:

$ sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.orig

now create a new file with the revised one above restart samba:

$ sudo systemctl stop smbd && sudo systemctl stop nmbd  
$ sudo systemctl start smbd && sudo systemctl start nmbd  

now try to access the file share on windows, if no joy recheck the paths to the shares at the bottom & the settings used in those sections (as we already know the main samba config works so leave it alone, just focus on the 2 shares).

after you make a change to the config file use the test tool as I did to ensure all is well with the syntax & then restart smbd & nmbd

good luck  smile


for more tips on samba:
https://bbs.archlinux.org/viewtopic.php?id=161389


ROG Strix (GD30CI) - Intel Core i5-7400 CPU - 32Gb 2400Mhz - GTX1070 8GB - AwesomeWM (occasionally XFCE, i3)

If everything in life was easy, we would learn nothing!
Linux User: 401820  Steam-HearThis.at-Last FM-Reddit

Offline

#5 2013-06-10 21:57:26

Janilson
Member
From: Recife-PE/Brazil
Registered: 2013-03-05
Posts: 55

Re: [SOLVED] Samba Issue (Arch+Win8 workgroup)

Hi again.

I did as you've told me to, I found the option to disable the password in network share configuration, but it didn't work. In arch, when I try to access the folders in windows, it asks me for the password.

I've run the command

sudo samba-tool testparm

and it gave me no error, after it, I have seen the content of new smb.conf file. But, when I try to access \\192.168.1.14 (virtual Arch Linux machine IP), Win gives me the error "cannot access location, error 0x80004005"

The most important to me is to be able to share a folder in linux so my sister can see it in her windows box.
If there's something else I have/can make, please let me know.

By the way, shall I need to give any permission in folder? When I run "ls -la" I see:
drwxr-xr-x 2 janilson janilson 4096 Jun 7 09:11 Teste

That is the folder I want to share.

I can try to make a network sharing using samba so windows machine can see it, if it is more easy than what I have tried so far.

Thanks again

Offline

#6 2013-06-13 23:08:59

Janilson
Member
From: Recife-PE/Brazil
Registered: 2013-03-05
Posts: 55

Re: [SOLVED] Samba Issue (Arch+Win8 workgroup)

I just tried https://wiki.archlinux.org/index.php/Sa … l_mounting

[janilson@archlinux ~]$ smbclient -L janilson  -U%

And I got this

Connection to janilson failed (Error NT_STATUS_UNSUCCESSFUL)

I still can`t access my archlinux folders from windows

Offline

#7 2013-06-17 00:02:18

Janilson
Member
From: Recife-PE/Brazil
Registered: 2013-03-05
Posts: 55

Re: [SOLVED] Samba Issue (Arch+Win8 workgroup)

I've just looked at /var/log/samba and I have seen many .log files, one of them has the name malibu.log (malibu is the name of my windows machine).
The file has the content below

2013/06/07 10:43:47.684675,  0] ../source3/smbd/service.c:784(make_connection_snum)
  canonicalize_connect_path failed for service public, path /home/Teste
[2013/06/07 10:43:47.687431,  0] ../source3/smbd/service.c:784(make_connection_snum)
  canonicalize_connect_path failed for service public, path /home/Teste
.....



......
[2013/06/16 20:48:26.986052,  0] ../source3/smbd/service.c:784(make_connection_snum)
  canonicalize_connect_path failed for service publico, path /home/Teste
[2013/06/16 20:48:26.987306,  0] ../source3/smbd/service.c:784(make_connection_snum)
  canonicalize_connect_path failed for service publico, path /home/Teste

The file is too large, but the entries seems to be repeating sad
Any idea?

Offline

#8 2013-06-17 14:09:25

Janilson
Member
From: Recife-PE/Brazil
Registered: 2013-03-05
Posts: 55

Re: [SOLVED] Samba Issue (Arch+Win8 workgroup)

I just solved it, I was using /home/teste (which does not exist( instead of /home/JANILSON/teste.
Sorry for mistake, but I've learned a lot with all this mess.
Thanks

Offline

Board footer

Powered by FluxBB