Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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)
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.
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.
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.
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
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.
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.
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.
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.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.