Cannot mount remote filesystem. Error "Unable to find suitable address"
I have a Linux box, running Fedora 16 and am trying to mount the C: drive from my Win XP box. I seem to have done everything by the book, but have obviously missed something. I have run out of ideas.
My Linux and XP boxes are connected to my home router, and can ping each other OK.
I have made my C: drive sharable.
I used the following command (and variations on it):
# mount -t cifs -o user=root,password=<mypassword>,rw //192.168.2.1/C /mnt/Windows-C
and the error I get is: "Unable to find suitable address."
I have this entry in my /etc/fstab:
//192.168.2.1/C /mnt/Windows-C cifs -o rw,guest,uid=1000,iocharset=utf8,codepage=unicode,unicode 0 0
What services should I be checking for? What else can I try?
Any help would be much appreciated. Thanks in advance.
The command should read as follows:
//192.168.2.1/C is the remote share. Remember I am assuming that you have shared C drive with the share name C. If you have shared it with some other name then use that name.
/mnt/Windows-C is your local linux mount point
-o user=name of the windows user account. The user account that is there on your Windows XP box which has right to access C drive.
When you will hit enter it will ask you for the password for the windows user account. Enter the password and it should work. I hope your Fedora system is configured to be part of the same workgroup as that of your Windows system. If not then please paste the smb.conf file of your Fedora system here in this thread.
Thanks for the quick reply.
I wasn't sure about the user/password. I had actually started with the Windows user/psw but with the same results.
I have checked the XP workgroup, which is "WORKGROUP". Here is a cutdown copy of my smb.conf.
#======================= Global Settings =====================================
workgroup = WORKGROUP
server string = Samba Server Version %v
; netbios name = MYSERVER
interfaces = lo eth0 192.168.2.1/24 192.168.13.2/24
hosts allow = 127. 192.168.2.
#============================ Share Definitions ==============================
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S
comment = All Printers
path = /var/spool/samba
browseable = no
; guest ok = no
; writable = No
printable = yes
comment = Fedora-home
path = /home
; read only = yes
; browseable = yes
guest ok = yes
comment = for updating remotely
path = /home/alan/samba-writable
read only = no
browseable = no
guest ok = yes
Did you try the command that I mentioned. If yes, what was the result?
If it failed then try the same command again and paste the output of the following command:
Yes, I tried that command.
[root@fedora-1 ~]# mount -t cifs //192.168.2.1/C /mnt/Windows-C -o user=owner
messages log tail as follows:
[root@fedora-1 ~]# tail /var/log/messages
Jan 10 20:52:44 fedora-1 systemd: Failed to read PID file /run/sm-client.pid after start. The service might be broken.
Jan 10 20:52:44 fedora-1 systemd: Startup finished in 1s 463ms 945us (kernel) + 2s 548ms 947us (initrd) + 2min 17s 227ms 892us (userspace) = 2min 21s 240ms 784us.
Jan 10 20:53:27 fedora-1 chronyd: Selected source 184.108.40.206
Jan 10 20:56:22 fedora-1 kernel: [ 358.690185] TCP lp registered
Jan 10 20:57:13 fedora-1 kernel: [ 410.415053] CIFS VFS: Error connecting to socket. Aborting operation
Jan 10 20:57:13 fedora-1 kernel: [ 410.415123] CIFS VFS: cifs_mount failed w/return code = -111
Jan 10 20:59:56 fedora-1 chronyd: Selected source 220.127.116.11
Jan 10 21:01:01 fedora-1 systemd-logind: New user root logged in.
Jan 10 21:01:01 fedora-1 systemd-logind: New session 3 of user root.
Jan 10 21:01:01 fedora-1 systemd-logind: Removed session 3.
This doesn't mean much to me, and I couldn't find any reference to code= -111 in a google search.
IGNORE THIS POST
Are you sure your smb and nmb services are running. Check the status using the following command:
samba_export_all_ro --> off
samba_export_all_rw --> off
If they show as off then turn them on using the following command:
Once done restart smb and nmb service once again and then give it a try.
FYI The server i.e. smbd and nmbd are independent of the client i.e. smbmount which is called by mount when using the cifs filesystem type.
In addition are you sure 192.168.2.1 is the correct IP address for your windows computer?
The console command smbtree will find all computers running SMB on your LAN and display their shares.
Please ignore the stuff posted in my previous post. After posting I realized you are mounting via Windows server. Sorry was posting in another thread at the same time and thought you to be using samba on a linux server.
As this you have got shared configured on Windows machine you do not require to check selinux boolean stuff. This stuff is required when you are hosting samba share on a linux machine.
However, as michaelk said we need to check if 192.168.2.1 is the IP address of your Widnows machine. Check if you are able to telnet Windows machine from linux machine on port 139 or not. Run the smbtree command as suggested my michaelk.
Another thing that you could try is specifying the workgroup in the mount command. The reason I am saying because it is required with some distributions like SuSE.
The IP address certainly was 192.168.2.1, but today it is 192.168.2.3!
smb and nmb services were not running. Now smb is running, but nmb will not start:
[root@fedora-1 ~]# service nmb start
Redirecting to /bin/systemctl start nmb.service
[root@fedora-1 ~]# service nmb status
Redirecting to /bin/systemctl status nmb.service
nmb.service - Samba NMB Daemon
Loaded: loaded (/lib/systemd/system/nmb.service; disabled)
Active: failed since Sat, 14 Jan 2012 17:51:35 +0000; 8s ago
Process: 1902 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 1903 (code=exited, status=1/FAILURE)
smbtree failed to find anything. I'm sure I don't need to start anything on my XP box - or do I?
the mount command now gives the following, and I am just investigating it:
# mount -t cifs -o user=root,rw //192.168.2.3/C /mnt/Windows-C
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
What is the name of the share on Windows. I doubt you shared it with the default name C. When you did smbtree did you not find Windows system and the device you shared?
As I can see in the command you are using user=root. As I mentioned before you need to mention the user name and the password of Windows user. Make sure that the user account that you are using with the mount command have access to the share.
Were you able to telnet Windows machine on port 139 from your linux machine?
Try the following command and see if it works:
Oh dear! yes, you're right, I was entering ROOT again.
It's working now. My next task is to connect to my remote printer, which I don't expect to be simple, so lookout for a new thread!
Thanks very much for all your help.
You're welcome. Enjoy linux!!!
Check Firewall settings
I received the same message when I tried to mount a drive from Linux to a windows server. It was working before and then stopped. I checked and realised that the anti-virus updated and enabled my firewall. After disabling the firewall the mount was working again.
|All times are GMT -5. The time now is 09:16 PM.|