Jesus Rincon <[email protected]> wrote:
> 2014-10-07 18:21 GMT-05:00 Robert Nelson <[email protected]>:
> > On Tue, Oct 7, 2014 at 6:20 PM, Jesus Rincon <[email protected]> 
> wrote: 
> > > Yes, I access as root user.
> >
> > Well as "desktop" user you are "debian"...
> >
> 
> oh.. I see. I'm not very good in using linux. Is there anyway to access as
> root in desktop
> 
It's not particularly easy, I've been moaning about this for a while,
it should be possible to to basic stuff like this as a non-root user.

I've have a (rather kludgy) workaround.

1 - Edit the sudoers file so that the user you want to be able to run
the Python script that uses the Adafruit IO libraries can 'sudo
/usr/bin/python' without entering a password.

2 - Change the shebang on your Python script to '#!/usr/bin/sudo
/usr/bin/python'.

The user will then switch to root privilege to run the Python
interpreter which runs the script.

It's a nasty kludge and introduces security holes galore but it does
make it possible to pretend that everythng can be done in ordinary
user mode.

(If you need more detail on how to do this I'm happy to provide it but
the sudo/sudoers man page should get you on your way)

-- 
Chris Green
ยท

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to