NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Mounting a folder

I am extremely new to linux, so I can't promise this won't be solved with a simple fix.

I have a cRIO-9068 connected to the network. I am trying to map a folder on my laptop to a folder on the cRIO. The goal is to be able to drop things in that folder and see them on my laptop.

I created a new folder in the /media/yoursharename on the cRIO and sent the following commands

cd /media

mount -t cifs //[IP Address]/NewFolder yoursharename/ -o username=[My Username]

it responded with

mount: mounting //[IP Address]/NewFolder on yoursharename/ failed: Connection refused

I can't say for certain if a firewall is preventing this or I am doing something stupid. What do you guys think?

0 Kudos
Message 1 of 32
(10,036 Views)

Since we're dealing with Windows shares, which can be notoriously picky regarding setup, my first step would be to attempt to access the same share from a Windows machine that is on the same network as the 9068.

If this works fine, I would next check what the kernel log has to say regarding the failure to access the drive (you can access the log by running dmesg right after an attempt to mount the share)

Message 2 of 32
(4,777 Views)

I can map the folder on another windows machine, so it might not be IT keeping me out.

When I type in dmesg I get this

[   11.544067] nikal: module license 'Copyright (c) 2002-2014 National Instruments Corporation.  All Rights Reserved.  Any and all use of the copyrighted materials is subject to the then current terms and conditions of the applicable license agreement, which can be found at <http://www.ni.com/linux/>.' taints kernel.

[   11.544110] Disabling lock debugging due to kernel taint

[   18.862032] eth0: no IPv6 routers present

[515995.152198] CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.3

[515995.255149] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

[515995.255194] CIFS VFS: Send error in SessSetup = -13

[515995.282243] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

[515995.282289] CIFS VFS: Send error in SessSetup = -13

[516086.403512] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

[516086.403557] CIFS VFS: Send error in SessSetup = -13

[516086.428365] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

[516086.428412] CIFS VFS: Send error in SessSetup = -13

[516569.961203] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

[516569.961249] CIFS VFS: Send error in SessSetup = -13

[516569.982861] Status code returned 0xc0000234 NT_STATUS_ACCOUNT_LOCKED_OUT

[516569.982908] CIFS VFS: Send error in SessSetup = -13

[519343.086606] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

[519343.086652] CIFS VFS: Send error in SessSetup = -13

[519343.110514] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

[519343.110745] CIFS VFS: Send error in SessSetup = -13

[519400.655736] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

[519400.655782] CIFS VFS: Send error in SessSetup = -13

[519400.679741] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

[519400.679787] CIFS VFS: Send error in SessSetup = -13

[519445.052132] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

[519445.052177] CIFS VFS: Send error in SessSetup = -13

[519445.073834] Status code returned 0xc0000234 NT_STATUS_ACCOUNT_LOCKED_OUT

[519445.073880] CIFS VFS: Send error in SessSetup = -13

I have no idea what that means.

The computer is in a domain. I doubt the cRIO is on that domain. Could that be the issue?

0 Kudos
Message 3 of 32
(4,777 Views)

LJHerskowitz wrote:

...

mount -t cifs //[IP Address]/NewFolder yoursharename/ -o username=[My Username]

it responded with

mount: mounting //[IP Address]/NewFolder on yoursharename/ failed: Connection refused

...

Did the mount command prompt you for a password? It seems odd that it does not ask for one and you haven't passed either the PW or a credentials file path on the command.

Also, since there were some changes between 2013 and 2014, what version of the software are you using on the target?

0 Kudos
Message 4 of 32
(4,777 Views)

It did not ask me for a password. I expected it to, but I'm guessing it never got that far. I amusing 2013 on the cRIO.

0 Kudos
Message 5 of 32
(4,777 Views)

Did you install the cifs packages from the feed server? On the target:

sed -i 's/^#[ \t]*\(.*http:\/\/\)us\.\(.*\)$/\1\2/g' /etc/opkg/angstrom*feed.conf

opkg update

opkg install cifs

This will get you the tools that you need on your target, but note that the mount tool (provided by busybox multi-binary) is not configured to know about the cifs filesystem type, you should instead use the command

mount.cifs //$WINDOWS_MACHINE/$SHARE /$LOCAL/$MOUNTPOINT -o user=$USERNAME

It should prompt you for a password at this point. I'm going to quickly try it out to make sure that memory serves me... updated with changes that were required for making it work locally

0 Kudos
Message 6 of 32
(4,777 Views)

I did not install CIFS. I tried to input the commands you said above but I got errors.

admin@RTDV-9068:/media# sed -i 's/^#[ \t]*\(.*http:\/\/\).*\(feed.*\)$/\1\2/g' /etc/opkg/angstrom*feed.conf

admin@RTDV-9068:/media# opkg update

Downloading http://feeds/next/ipk/eglibc/armv7a/base//Packages.gz.

wget: bad address 'feeds'

Downloading http://feeds/next/ipk/eglibc/armv7a/perl//Packages.gz.

wget: bad address 'feeds'

Downloading http://feeds/next/ipk/eglibc/armv7a/python//Packages.gz.

wget: bad address 'feeds'

Collected errors:

* opkg_download: Failed to download http://feeds/next/ipk/eglibc/armv7a/base//Packages.gz, wget returned 1.

* opkg_download: Failed to download http://feeds/next/ipk/eglibc/armv7a/perl//Packages.gz, wget returned 1.

* opkg_download: Failed to download http://feeds/next/ipk/eglibc/armv7a/python//Packages.gz, wget returned 1.

When I tried mount.cifs it replired

-bash: mount.cifs: command not found

0 Kudos
Message 7 of 32
(4,777 Views)

There was an error in the original sed command.

"sed -i 's/feeds\//feeds.angstrom-distribution.org\/feeds\//' /etc/opkg/angstrom*feed.conf"

0 Kudos
Message 8 of 32
(4,777 Views)

I am still getting errors

admin@cRIO:/media# opkg update

Downloading http://feeds.angstrom-distribution.org/feeds/next/ipk/eglibc/armv7a/base//Packages.gz.

wget: can't connect to remote host (140.211.169.161): Connection refused

Downloading http://feeds.angstrom-distribution.org/feeds/next/ipk/eglibc/armv7a/perl//Packages.gz.

wget: can't connect to remote host (140.211.169.161): Connection refused

Downloading http://feeds.angstrom-distribution.org/feeds/next/ipk/eglibc/armv7a/python//Packages.gz.

wget: can't connect to remote host (140.211.169.161): Connection refused

Collected errors:

* opkg_download: Failed to download http://feeds.angstrom-distribution.org/feeds/next/ipk/eglibc/armv7a/base//Packages.gz, wget returned 1.

* opkg_download: Failed to download http://feeds.angstrom-distribution.org/feeds/next/ipk/eglibc/armv7a/perl//Packages.gz, wget returned 1.

* opkg_download: Failed to download http://feeds.angstrom-distribution.org/feeds/next/ipk/eglibc/armv7a/python//Packages.gz, wget returned 1.

0 Kudos
Message 9 of 32
(4,777 Views)

The error messages indicate that the feed config files are configured correctly, but for some reason the connection is refused. We've seen the feed repos have intermittent availability at times, so you could retry and see if things are back up.

Alternately, you could just try downloading the cifs package, as that's all that is needed to get things working:

# wget http://feeds.angstrom-distribution.org/feeds/next/ipk/eglibc/armv7a/base/cifs_3.3.9-r4.9_armv7a.ipk

# opkg install cifs_3.3.9-r4.9_armv7a.ipk

0 Kudos
Message 10 of 32
(4,777 Views)