Monodevelop running terminal commands

50 views
Skip to first unread message

Dror Lugasi

unread,
Aug 21, 2016, 4:46:30 AM8/21/16
to BeagleBoard
Hey!

I am using monodevelop with the BBB and i have managed to write terminal command through code
but i can't run root commands. 

how can i write commands that need sudo permission? 

thanks! :)

John Syne

unread,
Aug 21, 2016, 7:12:45 PM8/21/16
to beagl...@googlegroups.com
I’m not sure what you are asking. To run commands that require root permission as a regular user, use "sudo command”. If you want to run those commands without using sudo, then change the group for that command and add your user to that group. 
 
Regards,
John




--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/d4a1f872-1c8b-462e-acd1-e8cc391dac30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mickeyf

unread,
Aug 22, 2016, 9:15:45 AM8/22/16
to BeagleBoard
As a probably better alternative to sudo, you may want to look at 'capabilities', which will allow your code permission for specific actions and against specific object, rather than being root.

http://www.linux-tutorial.info/modules.php?name=ManPage&sec=7&manpage=capabilities

http://man7.org/linux/man-pages/man7/capabilities.7.html

http://man7.org/linux/man-pages/man8/setcap.8.html

William Hermans

unread,
Aug 22, 2016, 2:18:30 PM8/22/16
to beagl...@googlegroups.com
I'd probably consider using groups. Like I briefly discuss here: https://github.com/wphermans/Bonejs/blob/master/documentation/permissions.md

However. sudo can be very specific with commands. So for instance if you wanted a regular user to be able to use apt-get update, and no other apt commands. You can lock that down very specifically in the sudoers file.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/163519a4-5f19-4a74-8a6a-45f091c76859%40googlegroups.com.

William Hermans

unread,
Aug 22, 2016, 2:20:33 PM8/22/16
to beagl...@googlegroups.com
Heres a quick simple example of command specific sudo usage. http://www.atrixnet.com/allow-an-unprivileged-user-to-run-a-certain-command-with-sudo/

Dror Lugasi

unread,
Aug 22, 2016, 2:47:46 PM8/22/16
to BeagleBoard
I tried to use sudo but it didnt work.
Thanks anyway!

Dror Lugasi

unread,
Aug 22, 2016, 2:49:46 PM8/22/16
to BeagleBoard
I solved it by changing the permissions to the files i wanted to use..
Thanks!
Reply all
Reply to author
Forward
0 new messages