Hi All
Another way advocated for running a program as superuser without a password:
Create or edit the file in sudoers.d which in my case is "mintupdate"
I added the line:
ALL ALL = NOPASSWD:/Projects/ThreadTest/Test
rebooted, yet no luck.
Then I changed the ownership and group to root, and then ran the file without being in root.
???? The file ran but didn't ask for a password.So, the above worked.
Yet the function that relies on being a superuser failed.
Then I ran the program again, but this time the terminal was in root.
The program worked correctly.
The only other odd thing is that I have set the file as executable, but clicking on it does nothing.
To run it, I have to type ./Test in the terminal.
So, it appears that making the program root without password does not allow a priority statement in the program to work.
Code: Select all
''Now you have to be Root otherwise next line fails.
Print "7;";pthread_setschedparam(*pThread1, SCHED_FIFO, @params)
It means that I have to enter into root before calling my program.
Not happy about that.
Regards