From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-27-2018 05:48 AM
I am attempting to mount a NFS share onto a 9030 cRIO using the system Exec VI.
I followed an old post below to get like NFS and cRIO set up for being linked:
https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/Issue-in-mounting-NFS-share-on-compactRio-90...
Unfortunatly the last step in the process of having it auto mount will not work for me. The NFS share is in the same RIG as the cRIO and it doesn't power on before the cRIO
Putty I can use the command (when logged in as admin user)
"mount -o port=2049,nolock,proto=tcp -t nfs 10.100.5.90:/CRR-RAID-Disks/Data /mnt/RAID_Link"
After this command the NFS share shows up on the cRIO in the location /mnt/RAID_Link
Trying to run this command via the system exec VI doesn't work without sudo. You get an error to say that lvuser doesn't have sudo access So I have added lvuser to sudo using the information from the below link:
https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/Is-it-possible-to-close-and-re-open-RTEXE-th...
However when I try to run "sudo mount -o port=2049,nolock,proto=tcp -t nfs 10.100.5.90:/CRR-RAID-Disks/Data /mnt/RAID_Link"
the standard output shows "sudo: mount: command not found"
Does anybody have any other suggestions on to programmatically link this NFS share or if i have missed something in the syntax of my command?
Solved! Go to Solution.
07-27-2018 06:08 AM
"sudo" does not exist on cRIO,
try to log in as the admin user, like they do in the link you posted.
or you could try su - admin -c "your command"
07-27-2018 07:44 AM
Its possible to install sudo on the RT target using the commands listed in the 2nd link in my original post.
First, install sudo
opkg updateopkg install sudo
The output from the system exec of sudo: mount: command not found suggests that it was able to find sudo but not able to find mount. Before you add lvuser as a sudoer you get an error message of sudo: permission is denied. in the format of the below:
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility.
I tried your suggestion of "su - admin -c" and it gives the response of
"su: must be run from a terminal"
07-30-2018 03:47 AM - edited 07-30-2018 04:05 AM
@nwxan90 wrote:However when I try to run "sudo mount -o port=2049,nolock,proto=tcp -t nfs 10.100.5.90:/CRR-RAID-Disks/Data /mnt/RAID_Link"
the standard output shows "sudo: mount: command not found"
Try "sudo /bin/mount [...]" or "sudo -- /bin/mount [...]".
In general you ran into issues mainly because your VI is executed as the unprivileged user "lvuser". This user, however, is not allowed to run the mount command. Using "su - -c "<command>" admin" does not work, as the su command requires an interactive terminal to ask for the password. There are tricks to sidestep this, however most of them won't work as the users admin and lvuser don't have a password set by default. This is a solution that works in any case (describing it in full for other readers):
07-30-2018 08:05 AM
07-30-2018 08:53 AM - edited 07-30-2018 08:53 AM
For anybody interested the full syntax i got to work is as follows
sudo -- /bin/mount -o port=2049,nolock,proto=tcp -t nfs <IP OF NFS SHARE:/Folder location on NFS> <Location on cRIO>
I made a folder on the cRIO in the mnt location that is where I map the NFS share to.
05-30-2021 10:57 PM
Hi, I'm trying to do same thing with the command ifconfig. I followed the instructions but still get the same message:
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
sudo: no tty present and no askpass program specified
I'm aware there is a vi to chenge the ip of the CRIO but I'm in need to change it without restarting the chassis. I made it with a terminal logged as admin, but I want to do it through Exec vi.
Thanks
05-31-2021 02:56 AM
Are you sure you replied to the right post? This thread is about mounting an NSF network share on your cRIO. You seem to ask about ifconfig which is the tool to control the network interface configuration.
05-31-2021 02:59 AM
Are you sure you replied to the right post? This thread is about mounting an NSF network share on your cRIO. You seem to ask about ifconfig which is the tool to control the network interface configuration.