NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Start / Stop Process as root with System Exec in RT Linux

Solved!
Go to solution

Hi, 

 

Is there a way of allowing LabVIEW to start/stop a process that needs root privileges? Attached is a snippet of the test code where I'm trying to command;

 

/etc/init.d/ntpd stop             #Stop NTP Daemon

 

I've tried using su command but receive error: su: must be run from a terminal.

 

Hardware: sbRIO-9651

Software: LV2015 SP1

0 Kudos
Message 1 of 3
(3,445 Views)
Solution
Accepted by topic author Oliver_15

Hi Oliver_15,

A reasonable approach is to install and configure sudo to allow you, as the lvuser user, to run the script (see: https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/Is-it-possible-to-close-and-re-open-RTEXE-th...)

Message 2 of 3
(3,424 Views)

Thanks. Just what I needed.

 

0 Kudos
Message 3 of 3
(3,375 Views)