NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

System Exec VI Calling umount

Hi all,

I need to safe umount my FAT32 filesystem USB mass storage device, and my final customer should be able to do that from the VI Front Panel (running on cRIO-9030 with HMI enabled). I would like to run programmatically a command like:

sudo umount /dev/sdcX

but it is allowed only by admin (not by lvuser). How can I do that?

There is a way to create a bash script calling

su admin

passing directly the password, without prompting it? It seems that

su admin -p 'adminPassword'

doesn't work

Thank you in advance

Andrea

0 Kudos
Message 1 of 3
(3,213 Views)

su itself generally requires being run from a terminal (interactive), but of course you can install and configure sudo to work for any user on the system, including lvuser (the user that runs the LVRT runtime)

0 Kudos
Message 2 of 3
(2,856 Views)

You need to add your user to sudoers by Visudo command

CLA, CTA, CLED

0 Kudos
Message 3 of 3
(2,856 Views)