[SOLVED] Samba help - can't access share via windows clients

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

[SOLVED] Samba help - can't access share via windows clients

Postby OldBaldy » Tue Dec 27, 2011 8:57 pm

Goal: Make the pogoplug a simple file server accessible by all my windows clients (I use Windows exclusively, no Linux clients)
I want to eventually install 3 USB external drives, formatted as EXT2, and shared to the various Windoze clients for their use
I decided to use EXT2 instead of NTFS because I understand that EXT2 is faster over the LAN than NTFS (and besides, I need to learn)

I am a total Linux noob.....but figured the pogo is cheap and I need to learn. Have been reading up on the Arch wiki, samba, etc for the last 3 days for 20 hours each to try to get started. The Samba wiki is mostly like Greek to me! :)

So I setup a pogoplug V2 (pink) with Arch as per (excellent!) guide.
Stumbled my way through Samba setup (eventually got SWAT working, which helped a lot.)

Installed Samba on a 2nd flash USB stick loaded on the Pogo to test the Samba sharing, before I buy the external USB hard drives and format them as EXT2 drives shared by the pogo samba server to all the windoze clients.
I formatted the 2nd flash drive as EXT2, and it is mounted as /dev/sdb1
I created a directory called pogo1flash that points to /dev/sdb1
I used SWAT to create a share called pogo1flash

This is where I'm stuck....

I have samba up and running.
I can see the pogo from a Windoze 7 client, and even map the network share in Windoze, as a "Z" drive.
BUT.....I cannot create any new files or folders on the share, as I get permissions issues.
I basically want the shares to be freely accessible, without logon passwords, etc to all my local LAN devices (mostly Windows 7 and XP).
I have disallowed all IPs outside of 192.168.1 and localhost

Questions!
1. Is samba the appropriate service to share the pogoplug Arch EXT2 USB drives to Windows 7 and Windows XP clients?
2. Should I install anything else to do this?
3. Is the "winbind" Samba service needed for this?
4. After rebooting my pogo, I notice that winbind is not started, I can start it manually via SWAT. How do I get winbind to start automatically after reboot? I tried to add it to rc.conf as a daemon but that did not work. Removed it.
5. Any ideas why I have permissions issues when accessing the share from Windoze clients? (be gentle...I'm dumb!)


My smb.conf below (edited to remove the deprecated "security = share" option)

# Samba config file created using SWAT
# from UNKNOWN (192.168.1.85)
# Date: 2011/12/27 14:32:11

[global]
server string = Samba Server
guest account = pogonas
username map = /home/pogonas
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = No
wins support = Yes
idmap config * : backend = tdb
hosts allow = 192.168.1., 127.

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

[pogo1flash]
path = /pogo1flash
read only = No
guest ok = Yes
hosts deny = ALL
Last edited by OldBaldy on Wed Dec 28, 2011 2:41 am, edited 1 time in total.
OldBaldy
 
Posts: 14
Joined: Tue Dec 27, 2011 4:38 am

Re: Samba help - can't access share via windows clients

Postby WarheadsSE » Tue Dec 27, 2011 9:10 pm

- Is pogonas user created?
- The username map is a home path? (I don't ust this option)
- wins is unneeded.
- i dont bother with hosts.allow (myself)

pogo1flash - hosts deny= ALL ?


Also of note: I've never used SWAT.. so..
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Samba help - can't access share via windows clients

Postby OldBaldy » Tue Dec 27, 2011 9:35 pm

Yes, pogonas user is created in Linux with password, and in samba with no password. (not sure if that's correct, but I read somewhere that samba password is not needed?)

username map - don;t have a clue if that's right, but I thought it should be where the default login directory for the user is?

wins not needed - thanks

I think I have to includes the hosts.allow (which is in [global]) if I also use hosts.deny=ALL in the specific share section (I think I understand that any conflicts between allow and deny will resolve to allow?)
Not sure if there is a better way to deny external IPs, as I want to configure the share as completely open to all internal IPs only.

OK, this is what I did....

1. Shutdown the unneded winbind service via SWAT
2. Removed the hosts.allow from [global]
3. Removed the hosts.deny from [pogo1flash]
4. restarted the smbd and nmbd services via SWAT
5. Disconnected the old network drive mapping to pogo1flash share on the Win 7 client and reconnected it

Minor progress....when I map the pogo1flash share to a drive letter on Win 7 client, I no longer need logon credentials! This is good.

BUT...I still can;t copy files from other drives into the new share from the Win 7 client. (permissions issue)
When I look at the status in SWAT, I see at the bottom....

PID UID Sharing R/W Oplock Share File Date
1804 1000 DENY_DOS RDWR NONE /pogo1flash . Tue Dec 27 15:41:26 2011
1804 1000 DENY_DOS RDWR NONE /pogo1flash . Tue Dec 27 15:41:59 2011
OldBaldy
 
Posts: 14
Joined: Tue Dec 27, 2011 4:38 am

Re: Samba help - can't access share via windows clients

Postby OldBaldy » Tue Dec 27, 2011 10:00 pm

This is the smb.conf file as it is now....(still can't write to the pogo1flash share from windows)

# Samba config file created using SWAT
# from UNKNOWN (192.168.1.85)
# Date: 2011/12/27 16:00:14

[global]
server string = Samba Server
guest account = pogonas
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = No
wins support = Yes
idmap config * : backend = tdb

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

[pogo1flash]
path = /pogo1flash
read only = No
guest ok = Yes
OldBaldy
 
Posts: 14
Joined: Tue Dec 27, 2011 4:38 am

Re: Samba help - can't access share via windows clients

Postby WarheadsSE » Tue Dec 27, 2011 10:25 pm

mine:
$this->bbcode_second_pass_code('', '

[global]
workgroup = WORKGROUP
netbios name = GFN
security = user
null passwords = yes
map to guest = bad user
dns proxy = no
load printers = yes
printcap name = /etc/printcap
disable spools = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=65535 SO_SNDBUF=65535 SO_KEEPALIVE

[media_w]
path = /media/
read only = no
public = no
guest ok = yes
writeable = yes
force user= root
')
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Samba help - can't access share via windows clients

Postby OldBaldy » Tue Dec 27, 2011 11:23 pm

I think my problem is that I still don't fully understand the relationships between users, samba users, home directories, shares, etc. reading, reading, reading!!!!

1. I have /dev/sda1 as the root Arch stuff, on a flash drive on the pogo
2. I want a 2nd flash drive /dev/sdb1 to share my photos via an EXT2 Samba share called "pogo1flash"
3. I setup a Linux user called "pogonas", with standard home directory on sda1 ( /home/pogonas )
4. I setup a samba user of the same name, with no password
5. I did a mkdir pogo1flash
6. and mounted pogo1flash to /dev/sdb1 (where I want to share all my photos)
7. I configured a share called "pogo1flash" in samba with "path = /pogo1flash"

Now, when I go to my Win 7 client, I see the share called "pogo1flash" as a "Network location."

So far, so good!

BUT, when I go to map that network location in windows to a drive letter ("Z"), and I browse for the network path, windows presents TWO locations for me, under my pogo server called "ALARM"....

1. "pogo1flash" (as expected)
2. "pogonas" (I thought this is my samba USER name? Why is that shared?)

If I try to map the drive letter in WIN7 client to the share "pogo1flash", then it maps, but I have no access to write new files/directories to that location (permissions issue)

If, however, I map the drive letter in WIN7 client to the user "pogonas", then it maps, and I have full access as I want, EXCEPT that this is now in the user's HOME directory (on the /dev/sda1 drive) in the directory "/home/pogonas", and NOT in the required "/dev/sdb1" location on the other drive.

I'm happy to at least get access to the samba system from windows, but now need to figure out how to get the share working on the /dev/sdb1 drive instead of the /dev/sda1 drive.....

Do I need to have a specific samba user for each share, and have that home directory exactly where I want to share?
(I thought that smb.conf could point the share to the correct location via the "path = xxxxx" clause?
If this is true, then I should make a user "pogo1flash" with the user home directory on /dev/sdb1?
OldBaldy
 
Posts: 14
Joined: Tue Dec 27, 2011 4:38 am

Re: Samba help - can't access share via windows clients

Postby OldBaldy » Wed Dec 28, 2011 2:41 am

OK, finally solved it.

I deleted the pogonas user from pdbedit and linux
I made a mount directory "imagedisk" for the /dev/sdb1 2nd flash drive to contain my images
I made a dir from that mount point called images (/imagedisk/images)
I added a new user called pogoimages and also into pdbedit for Samba
and I bounced the samba service and the pogo itself

Still didn't work, so I then edited my own smb.conf file and removed all the entries and manually copied warheadsSE's smb.conf file into my file, exactly the same except for ....

netbios name = alarm
load printers = no
share name changed to [pogoimages]
path = /imagedisk/images (which is on the other drive.... /dev/sdb1 and not the root drive /dev/sda1)

...and I removed the various deprecated lines that testparm gave me from the file.... and it's now working!

The only real difference I can find is the new line in the [(sharename)] section that I did not have....

"force user = root"

The line above seemed critical to get my shared usb drive working in Windows.

My latest, working smb.conf file below....

[global]
map to guest = Bad User
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=65535 SO_SNDBUF=65535 SO_KEEPALIVE
load printers = No
printcap name = /etc/printcap
dns proxy = No
idmap config * : backend = tdb

[pogoimages]
path = /imagedisk/images
force user = root
read only = No
guest ok = Yes
OldBaldy
 
Posts: 14
Joined: Tue Dec 27, 2011 4:38 am

Re: [SOLVED] Samba help - can't access share via windows cli

Postby WarheadsSE » Wed Dec 28, 2011 4:07 am

Likely culprit? permissions on the mount ;)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 5 guests