LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-16-2015, 04:56 PM   #1
garwhi
LQ Newbie
 
Registered: Feb 2015
Posts: 17

Rep: Reputation: Disabled
Can't access Windows share from Linux


Hi all. I can't connect to my Win 8.1 box from Linux Mint. I can ping the Win box successfully. I can access my Linux share from my Win box. It seems like the problem is with windows. I've been working on this problem for about three days now with no luck. I've uninstalled Norton Security in my Win box. I've deactivated Microsoft's firewall. Not helping. My smb.conf is:

[homes]
read only = no
security = domain
workgroup = WORKGROUP

[share]
comment = Shared Data
path = /home/gary/share
gues ok = yes
writeable = no
browseable = yes

To make things simple i created only one shared folder on my Win box, asm. On Linux i type: sudo mount.cifs //GARYZ97/asm /home/gary/share -o user=Gary ; Gary is apparently my correct Windows username. BTW, i've also tried gary.
Linux responds with: [sudo] password for gary: jj ; this is my correct sudo password
Next response is: Password for Gary@//GARYZ97/asm: ; here i have tried my Microsoft Account password; i've tried just hitting enter; i've tried jj my Linux password. I'm at my wits end. What am i doing wrong? I've googled so many different sites but no one seems to have the problem i have. Please help. I don't want to pull out all my hair. I can access my Linux share from Windows, edit it, save it, and i see the changes on my Linux box. I know i'm being repetitive here but i just can't access my Windows share from Linux. I have run testparm on smb.conf and no problems there. Almost forgot. After entering what i believe is my correct Windows password i get: mount error(115): Operation now in progress, and then on the next line, Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Last edited by garwhi; 02-16-2015 at 04:58 PM.
 
Old 02-16-2015, 05:19 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Check your settings

The problem may not be on your Linux box at all, ans changing settings there may be of little help.

On your windows 8.1 box (what version of 8.1?) did you turn on file and print sharing? HAve you set encryption down to the 40-56 bit encryption standard? If not, try these.

BTW: I am pretty sure that last password prompt is asking for your Windows password.
 
Old 02-16-2015, 05:28 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
smb.conf is not applicable. That's the Samba config, which is only used for Linux exports. When you mount a Windows share in Linux you are using CIFS, Samba is not in the mix at all. I'm wondering if exporting the mount location back out through Samba might be causing a problem.

Try using the Windows box's IP instead of its host name.

That should be "-o username=Gary", not "-o user=Gary". See the mount.cifs man page for why.

Could still be a Windows firewall issue. See here for some small tests you can do:
http://thinkinginsoftware.blogspot.c...on-now-in.html
 
1 members found this post helpful.
Old 02-16-2015, 05:35 PM   #4
garwhi
LQ Newbie
 
Registered: Feb 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
wpeckham: I have Windows 8.1 Pro. I will try 40-56 bit encryption. Also thanks for correcting me on how i should be using username=Gary and not user=Gary. I have yet to click on your supplied link but will in a few minutes. And yes, file and print sharing is turned on. Reduced encryption level and rebooted but no change.

Last edited by garwhi; 02-16-2015 at 06:13 PM.
 
Old 02-16-2015, 05:38 PM   #5
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Oh yeah...

PS I looked it up. suicidaleggroll is right, trying to re-share a share is trouble even if it works. The normal case is for it not to work.
 
Old 02-16-2015, 05:44 PM   #6
garwhi
LQ Newbie
 
Registered: Feb 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
suicidaleggroll: My /var/log/syslog shows "Global parameter security found in service section!" And then "CIFS VFS: Error connecting to socket. Aborting operation". And lastly "CIFS VFS: cifs_mount failed w/return code = -115."
Tried $ telnet IP 445. Got "Trying 198.105.254.225... and then nothing. Being a newbie i'm not sure whether ping ip should be done literally like that or ping my win ip address. I can ping my win box (192.168.1.9) with no problem.
Tried to cut and paste from a terminal but didn't work. I'll type in the results of my ping of win box:
$ ping 192.168.1.9
PING 192.168.1.9 (192.168.1.9) 56(84) bytes of data.
64 bytes from 192.168.1.9: icmp_seq=1 ttl=128 time=16.4ms
.
.
.
--- 192.168.1.9 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5005ms
rtt min/avg/.. blah blah blah ms

Just now tried $ telnet 192.168.1.9 445 and got this:
Trying 192.168.1.9...
Connected to 192.168.1.9.
Escape character is '^]'
Connection closed by foreign host.

Tried $ smbtree -b -N and got my Linux box, my Win 8.1 box and my wife's Win 7 box and info about my Linux shares, which looks ok.

Last edited by garwhi; 02-16-2015 at 06:52 PM. Reason: Tried something new
 
Old 02-16-2015, 05:56 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
ping IP (that "IP" is just a placeholder, it should be your Windows box's IP) tests whether the Windows box is responding on that IP

telnet IP 445 (again, "IP" should be your Windows box's IP) tests whether the Windows box is listening on that IP and port # 445, which is the port for Windows network sharing.
 
Old 02-16-2015, 06:07 PM   #8
garwhi
LQ Newbie
 
Registered: Feb 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
So then i should be using mount cifs with the appropriate parameters rather than smb to connect my Win share to Linux?
This is what i've been using, trying to tailor it to my situation.

Accessing the Windows Share from Linux
You should be able to mount the shared folder by using the GUI in Linux, but it’s also very easy to do with the command line, and it’s easier to show a terminal example because it will work across many different distributions.

You’ll need the cifs-utils package in order to mount SMB shares:

sudo apt-get install cifs-utils

After that, just make a directory and mount the share to it. In this example, we will mount the folder to our Desktop for easy access.

mkdir ~/Desktop/Windows-Share

sudo mount.cifs //WindowsPC/Share /home/geek/Desktop/Windows-Share -o user=geek
 
Old 02-16-2015, 07:12 PM   #9
garwhi
LQ Newbie
 
Registered: Feb 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Tried editing fstab file

Quote:
Originally Posted by wpeckham View Post
PS I looked it up. suicidaleggroll is right, trying to re-share a share is trouble even if it works. The normal case is for it not to work.
Obviously i'm a super noob. Could you just spell it out for me what should work? Latest attempt to fix the problem, based on a google search, i've edit my fstab file to what i believe should work. I guess that's just for convenience. Then did the recommended sudo mount -a but still, every expletive-deleted time i keep on getting mount error(115). I've researched this error message many times but still can't get it to work. I've been trying to get this resolved now for the last three or four days spending several hours each day on it, and still no joy.
 
Old 02-16-2015, 07:40 PM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
1) Remove the /home/gary/share export from smb.conf - Samba and smb.conf are NOT what you want to use for this

2) Try using the Windows box's IP instead of its host name.

It looks like the telnet seems fine.
 
Old 02-16-2015, 07:59 PM   #11
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
Using the IP address of the Windows box might not work. It causes the CIFS network protocol to fall back to an earlier version, which your Windows box may decide to reject.

If the Linux box is unable to resolve the name of the Windows PC, you'll need to specify the IP address using the "ip" parameter:
Code:
mount -t cifs -o ip=ip.address.of.windows.pc,username=User_account //windows-pc/share_name /mnt/mountpoint
The hostname "windows-pc" is case-insensitive, but must otherwise EXACTLY match the name of the Windows box (the so-called "NetBIOS name"). It's the name that's returned by the hostname command, and it can be viewed and changed from Control Panel > System > Advanced system settings (select the Computer Name tab).

The account "User_account" must exist on the Windows box, and have the relevant permissions to access the share and the underlying file system folder. The mount command will prompt for a password unless you specify one with the "password=" parameter.

It doesn't really matter if you use mount.cifs rather than mount -t cifs, as the latter will simply call the former. The advantage of using just mount is that the syntax of the command is more consistent across file systems.

Last edited by Ser Olmy; 02-16-2015 at 09:30 PM.
 
Old 02-16-2015, 08:03 PM   #12
garwhi
LQ Newbie
 
Registered: Feb 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
delete /home/gary/share export

Quote:
Originally Posted by suicidaleggroll View Post
1) Remove the /home/gary/share export from smb.conf - Samba and smb.conf are NOT what you want to use for this

2) Try using the Windows box's IP instead of its host name.

It looks like the telnet seems fine.
I did delete that entry in my smb.conf. Forgot to restart samba. Will do that now. Nope. No difference. Still mount error(115). I'm guessing i should be using mount -t cifs which i saw somewhere is the same as mount.cifs. Maybe the following is causing the problem. I have, as far as i know, only the one Administrator account on my Win 8.1 box. I've tried $ sudo mount.cifs //GARYZ97/asm /home/gary/share -o username=Administrator, but that didn't work either. I've also told Malwarebytes to accept my Linux IP address. I've taken down my windows firewall (makes me a little nervous), for both public and private networks. I don't know what else to try. Something different this time. I replaced //GARYZ97 with the equivalent //192.168.1.9 and this time got mount error(16): Device or resource busy. Is this progress?

Last edited by garwhi; 02-16-2015 at 08:06 PM.
 
Old 02-16-2015, 08:41 PM   #13
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
What is the output of "df -h" and "mount"?
 
Old 02-16-2015, 09:24 PM   #14
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
What method did you use on Windows to share the Windows share? I ask because Windows "homegroup" sharing does not work with anything but other Windows devices.
 
Old 02-16-2015, 09:33 PM   #15
garwhi
LQ Newbie
 
Registered: Feb 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Wink results of df -h and mount

Quote:
Originally Posted by suicidaleggroll View Post
What is the output of "df -h" and "mount"?
Is there some way i can capture the output of terminal commands so i don't have to type them out here?
$ dh -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 213G 6.7G 195G 4% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 3.9G 12K 3.9G 1% /dev
tmpfs 787M 1.5M 785M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 3.9G 55M 3.8G 2% /run/shm
none 100M 36K 100M 1% /run/user
/dev/sdb1 978M 11M 967M 2% /media/gary/USB Stick
//192.168.1.9/asm 1.9T 659G 1.2T 36% /home/gary/share

$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=gary)
/dev/sdb1 on /media/gary/USB STick type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
//192.168.1.9/asm on /home/gary/share type cifs (rw)

There might be some types there. Hope not. It was a lot of typing.
 
  


Reply

Tags
linux, samba, smb, windows



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Share Linux Dir and access through windows rajes4india General 5 04-12-2012 06:02 AM
Can't access the linux share from windows 2008 server cbc Linux - Newbie 3 07-01-2011 06:08 PM
windows share to access from linux pc salimshahzad Linux - Server 2 12-12-2009 07:49 AM
Access linux SAMBA share from windows pengu Linux - Software 6 02-17-2007 11:55 AM
cannot access my Linux share from Windows va7hg Linux - Networking 6 12-13-2005 08:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration