Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a head unit that runs Linux that is connected to my PC via an Ethernet cable. I have a Windows XP share on this PC that the head unit needs to be able to mount, however, when mounting using the following command, it fails.

Here is the command that fails, along with the verbose output:

# fs-cifs -vvvvvvvvv -l //CUMBRIA-XP:192.168.1.2:/hnet /mnt/net
cifs[2158679-1]: starting...
cifs[2158679-1]: user is to input both name & passwd.
cifs[2158679-1]: server [192.168.1.2]  share [hnet]  prefix [/mnt/net]  user [nu
ll]  passwd [null]
Welcome: 192.168.1.2(:/hnet) -> /mnt/net
Username:headunit
cifs[2158679-1]: user name: headunit length 8

cifs[2158679-1]: new server
Password:

cifs[2158679-1]: establishing connection to (192.168.1.2)CUMBRIA-XP
cifs[2158679-1]: session request: 192.168.1.2:CUMBRIA-XP -> localhost
cifs[2158679-1]: negotiating smb dialect
cifs[2158679-1]: skey(idx=2): 00000000, challenge:(8), 6137bfa2 f2d7803b
cifs[2158679-1]: negotiation: success with dialect=2
cifs[2158679-1]: logging headunit on 192.168.1.2
cifs[2158679-1]: new packet
cifs[2158679-1]: returning: mid 0 status= 0
cifs[2158679-1]: smb_logon successful: dialect 2 enpass 1
cifs[2158679-1]: mounting 192.168.1.2:/hnet
cifs[2158679-1]: returning: mid 1 status= 13
cifs[2158679-1]: smb_mount: Bad file descriptor
cifs[2158679-1]: try upper case share.
cifs[2158679-1]: session request: 192.168.1.2:CUMBRIA-XP -> localhost
cifs[2158679-1]: negotiating smb dialect
cifs[2158679-1]: skey(idx=2): 00000000, challenge:(8), 2d3e910f e3e148c4
cifs[2158679-1]: negotiation: success with dialect=2
cifs[2158679-1]: logging headunit on 192.168.1.2
cifs[2158679-1]: returning: mid 2 status= 0
cifs[2158679-1]: smb_logon successful: dialect 2 enpass 1
cifs[2158679-1]: mounting 192.168.1.2:/HNET
cifs[2158679-1]: returning: mid 3 status= 13
cifs[2158679-1]: smb_mount: Bad file descriptor
cifs[2158679-1]: mount failed.
cifs[2158679-1]: io_mount: smb_connection failed: Bad file descriptor
io_mount: Bad file descriptor
cifs[2158679-1]: user is to input both name & passwd.
fs-cifs: missing arguments, or all mount attempts failed.
run "use fs-cifs" or "fs-cifs -h" for help.

Any ideas? It is worthy to note that /mnt does not exist on the filesystem, but I was told by the company who gave us these units that fs-cifs should automatically create the /mnt/net folders if they don't exist.

share|improve this question

4 Answers 4

This appears to be failing because /mnt/net doesn't exist.

If you're unable to create this directory, try creating a directory elsewhere in the filesystem and mounting your share there instead.

share|improve this answer

If you are using the windows7 PC by default the anonymous samba user is disabled. So to mount the local windows shared folder onto the QNX(any linux based systems) system you need to change the two registry key values from the below path

HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Control->Lsa

Highlight the Lsa. On the right side you can see the following keys

restrictanonymous restrictanonymoussam Change the value of the above keys from 1 to 0

Restart the PC then you execute the command(replace the appropriate values) //fs-cifs -a //MyMachineName:MyMachineName:/ShareName /mnt/net username password

Then you will be able to mount the local windows shared folder onto any linux or unix based systems.

share|improve this answer

At the very least, I'd suggest creating /mnt/net and giving it another shot. Most mount-like programs on Linux follow the mount convention of:

mount <device> <mountpoint>

of which <mountpoint> is presumed to already exist.

share|improve this answer
    
I'm aware, however, it is impossible to create a directory on the root filesystem. Specifically this unit is running QNX Neutrino, and for whatever reason, mkdir does not seem to work on a qnx4 partition. Mounting also fails in the same way when I try to mount the share to one of the mounted FAT32 filesystems present as well. –  Alexander Miles Jul 8 '11 at 17:47
    
Do you get a different error when you try to mount to the (presumably writable) FAT32 filesystem, or is it still "bad file descriptor"? –  Handyman5 Jul 8 '11 at 17:50
    
No. Actually, if I run fs-cifs as a daemon, then use the standard mount command, it returns no errors. However, it does not see any of the files on the share. –  Alexander Miles Jul 8 '11 at 18:14
    
Looking at the log more closely, it looks like fs-cifs is attempting to connect to 192.168.1.2:/hnet, failing, retrying 192.168.1.2:/HNET, and failing again. Is it possible that the Windows XP machine is not offering a "hnet" share? On the machine itself, can you connect to "\\localhost\hnet"? –  Handyman5 Jul 8 '11 at 18:47
    
This was my first thought, but yes, I can connect to /hnet from the local machine and from other Windows machines on the network. –  Alexander Miles Jul 11 '11 at 13:53

By default Windows XP has an idiotic thing called "Simple File Sharing" turned on. Disable it via the Folder Options/View dialog. It's right down the bottom of the list of options. Once that is disabled you should be able to access the share.

share|improve this answer
    
Good suggestion, but it did not work. I just tested mounting one of the shares on our main file server (SBS 2011) as well to see if it was an issue with our PCs, however, the same thing happens: it finds the server just fine and authenticates, it just cannot see the share. –  Alexander Miles Jul 11 '11 at 17:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.