Jump to content
OMRON Forums

Non root users?


KEJR

Recommended Posts

I'm wondering what the official position is on user logins. Mainly this would be related to a ppmac user login (or autologin) to X windows and then starting HMI and C apps that are accessing the DT libraries on the PPMAC (the c apps would also be running xenomai threads).

 

Should we just plan to always run as root, or does it matter at all? What about setting up "sudo" to run select apps as root?

 

Thank you,

KEJR

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

 

You can run as a non root user but it doesn't gets you anything since we mount the file system read only. See http://www.xenomai.org/index.php/Non-root_RT big fat warning.

 

To run as non route you must

 

1.) Create a xenomai group with

groupadd xenomai

2.) Add xeno_nucleus.xenomai_gid=1001 to boot parameter addmisc (Note: 1001 is the gid of the group created above)

ie. From the bootloader via RS232

setenv addmisc 'setenv bootargs ${bootargs} xeno_nucleus.xenomai_gid=1001'

3.) Add deltatau to xenomai group by usermod command e.g.

usermod -G xenomai,deltatau deltatau

4.) Change permission of /dev/rtheap

chown deltatau:xenomai /dev/rtheap

5.) Change permission of /dev/mem

chown deltatau:xenomai /dev/mem

 

In addition, we did have to make a permission modification to our code that generates an ascii table corresponding to pmac. This modification will be available in the June/July Firmware Release to support running as non root.

 

However, you can always sudo which works just fine and is a lot less trouble.

 

I'm wondering what the official position is on user logins. Mainly this would be related to a ppmac user login (or autologin) to X windows and then starting HMI and C apps that are accessing the DT libraries on the PPMAC (the c apps would also be running xenomai threads).

 

Should we just plan to always run as root, or does it matter at all? What about setting up "sudo" to run select apps as root?

 

Thank you,

KEJR

 

 

 

Link to comment
Share on other sites

However, you can always sudo which works just fine and is a lot less trouble.

 

I think this is a good approach. I'll create a new user and allow them to sudo our HMI and xenomai process. One reason I'm looking into this is that it may make autologin very easy to do. The docs for gdm say they allow autologin at boot time by editing 2 lines in the gdm.conf file, but that root will never be able to auto login. So if I had another user and could autologin and then run our programs as root using sudo I think we are all set.

 

I just didn't want to go down that road if I didn't have to, but it looks to be the simplest solution for now.

 

Thanks,

KEJR

Link to comment
Share on other sites

  • 2 years later...

My goal: use gpascii from a non-root user.

I am a linux beginner. I was able to change the root password, to create new users and groups.

 

1/ I can't get the "sudo" working, i always get as reply "-sh: sudo: command not found". I was tring to launch a gpascii from a ssh connexion of a user i created.

 

2/Could i have some more details about this extract:

2.) Add xeno_nucleus.xenomai_gid=1001 to boot parameter addmisc (Note: 1001 is the gid of the group created above) ie. From the bootloader via RS232 setenv addmisc 'setenv bootargs ${bootargs} xeno_nucleus.xenomai_gid=1001'

Could i modify a file (i guess not as /sys/ is not part of ./Readonly)

If i have to use RS232 case, which software will you advice to interface and send the command? Is 'setenv bootargs ${bootargs} xeno_nucleus.xenomai_gid=1001' the exact and complete command?

 

3/Could we imagine that my PPMAC C application (autolaunch) sending system commands to modify those rights after a standard PPMAC boot?

 

Thank you!

Anthony

Link to comment
Share on other sites

  • 1 month later...
Guest
This topic is now closed to further replies.

×
×
  • Create New...