access mint share in windows (again) [SOLVED]

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
downunder

access mint share in windows (again) [SOLVED]

Post by downunder »

hello,

in my last topic here, i had a problem with sharing folders in Mint, to access them in Windows Vista and with my Xbox. The problem was solved with adding a few lines to smb.conf. The usershare method didn't work, but the classic samba worked fine. I have a new computer, with Mint 7 installed. Simple sharing also doens't work. I added the same lines to smb.conf as on the previous computer, but I cannot access these folders in Windows. In Windows after entering \\192.168.2.20 I see the shared printer and the 2 folders "data" and "data2" , but they cannot open due to the fact that windows user has no rights.
Strange this is, that when I change the path to /home/benjamin , I can access my Mint home folder, and even open the desktop folder but not the data and data2 folder.. :?:

the lines added to smb.conf:

[data]
path = /home/benjamin/data
available = yes
browsable = yes
public = yes
writable = yes

[data2]
path = /home/benjamin/data2
available = yes
browsable = yes
public = yes
writable = yes

usershare folder in /var/lib/samba is empty.

smbtree:
\\PC
\\GEODE geode server (Samba, LinuxMint)
\\GEODE\Print_to_PDF Print to a PDF File
\\GEODE\IPC$ IPC Service (geode server (Samba, LinuxMint))
\\GEODE\data2
\\GEODE\data
\\GEODE\print$ Printer Drivers


what to do to get it to work? If I remember correctly, I have the same settings on this computer as on my other computer. Or have I forgotten something?

thanks in avance!
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.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: access mint share in windows (again)

Post by altair4 »

I remember you. As I recall I said you should install Mint 7 and all your Usershare problems would be solved. You know, we're really going to have to fix this usershare problem one day.

As I recall /home/benjamin/data, and /home/benjamin/data2 are mount points to ntfs partitions are they not?

Can you post your /etc/fstab please?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
downunder

Re: access mint share in windows (again)

Post by downunder »

hi Altair,


i was hoping you would reply :). Indeed I talked about installing Mint 7. Well, I bought a new computer with an intel duo core. Why not install the latest version :)
and indeed stil the simple file sharing doesnt work, I think it has something to do with some updates I did with Mintupdate. I remember some packages with the name Samba in it were installed, but I'm not sure anymore.

this is fstab. As you can see, I installed those 2 hdd's in this computer, and added the exact same lines as on the old computer.

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=8c019e74-db56-40ff-b9fa-53bf53ef1c3a / ext3 relatime,errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=dc041e77-cadc-44b8-b2d4-9ccdd04b2dfc none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
/dev/sdb1 /home/benjamin/data ntfs defaults,umask=007,uid=1000,gid=46 0 0
/dev/sdc1 /home/benjamin/data2 ntfs defaults,umask=007,uid=1000,gid=46 0 0
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: access mint share in windows (again)

Post by altair4 »

Try this:

Add the following line to each share definition: force user = benjamin
So that it looks like this:

[data]
path = /home/benjamin/data
available = yes
browsable = yes
public = yes
writable = yes
force user = benjamin

[data2]
path = /home/benjamin/data2
available = yes
browsable = yes
public = yes
writable = yes
force user = benjamin

Once saved, open a Terminal and type sudo service samba restart.

I think the problem is you're allowing guest access in samba but your not allowing guest access in fstab. The last "7" in umask=007 prohibits guest access to the directory. Force user will make samba think all guests are you.
That's the theory anyway :wink:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
downunder

Re: access mint share in windows (again)

Post by downunder »

and it works :) Thanks!

but how is this possible? i added the same lines as in my old fstab, i added the same lines in smb.conf. And on my old computer the shares work, on this computer they don't. at least not without the force user line.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: access mint share in windows (again)

Post by altair4 »

I'd have to go through your old posts. As I recall I was so intent on making usershares work that I had you modify smb.conf to the default recommended state for usershares which requires force user = be inserted into the [global] section instead of in the [share] section. The [global] section would affect all shares. You could have done the same thing here by the way. Instead of adding it to each share add it to the [global] section.

On a personal note, do you recall what the problem was with usershare in Mint 7? I just can't seem to let that go :lol:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
downunder

Re: access mint share in windows (again)

Post by downunder »

with Usershares the problem was that in windows after entering \\ip_adres\ of the Mint pc I saw the data and data2 folders, but could not open them. I think it was an error message about not having rights to access them.

If you're interested, I could backup my smb.conf and change it back to the original state, and create a usershare with Nautilus to see what the exact error message is? to be honest, I'd like to have it working too, it's much easier creating shares that way, then in smb.conf. (more windows-like.. ;) )
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: access mint share in windows (again)

Post by altair4 »

Don't do it just for me. But if you are don't forget to add force user = benjamin to the global section first. :wink:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
downunder

Re: access mint share in windows (again)

Post by downunder »

backed up the smb.conf file to my desktop. Added force user = benjamin to the global section, deleted the 2 shares at the bottom. restarted the computer. created two shares in Nautilus. Both shares opened without a problem in Vista.. :) this probably has to do with the force user in smb.conf?

can you remember if we tried this the first time?
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: access mint share in windows (again)

Post by altair4 »

YES !!! OH HAPPY DAY !!!! :mrgreen: :mrgreen: :mrgreen:

If I recall you had two post - one on mounting - and one on sharing. They were back to back. I think we tried about 43 different things between two posts. I wrote a how to on Simple Sharing months earlier that clearly states that a force user was recommended so you'd think that would have been one of the 43 things we tried.....But we were both kids back then :lol:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
downunder

Re: access mint share in windows (again)

Post by downunder »

probably just forgot that one thing that solves it all :)

I only hope this is my last topic about file sharing ;)

thanks again for your help, it's much appreciated!
Locked

Return to “Networking”