DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 31st May 2008
maurobottone maurobottone is offline
Real Name: Mauro Bottone
Port Guard
 
Join Date: May 2008
Location: Aversa, IT
Posts: 24
Thanked 0 Times in 0 Posts
Default command launched by normal user...

I need, every time machine boots up, that "startx" and "x11vnc -forever -display :0" commands automatically starts by "rc.local file" but not with root privilege: with user "xxx" privilege ...how can I do this?
__________________
"Non ex regula ius sumatur, sed ex iure quod est regula fiat."
Reply With Quote
  #2   (View Single Post)  
Old 31st May 2008
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,886
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by maurobottone View Post
I need, every time machine boots up, that "startx" and "x11vnc -forever -display :0" commands automatically starts by "rc.local file" but not with root privilege: with user "xxx" privilege ...how can I do this?
Until the user has authenticated, how can the system know which user account is to be used? Is it always the same?
Reply With Quote
  #3   (View Single Post)  
Old 31st May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

If you know what user account it needs to be run as, or have a special user for running it:


/etc/rc.local ->

su username -c /path/program args


You can also use su to use a specific login class with su's -c switch, e.g.

su -c loginclass username -c /path/prog args

every thing after username is passed to the shell, the man page is useful.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #4   (View Single Post)  
Old 31st May 2008
maurobottone maurobottone is offline
Real Name: Mauro Bottone
Port Guard
 
Join Date: May 2008
Location: Aversa, IT
Posts: 24
Thanked 0 Times in 0 Posts
Default

Thanks ocicat and TerryP
TerryP I've followed your post: now I can do what I would.
Good evening!
__________________
"Non ex regula ius sumatur, sed ex iure quod est regula fiat."
Reply With Quote
  #5   (View Single Post)  
Old 1st June 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

your welcome
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: mounting an USB device as normal non-root user in OpenBSD J65nko Guides 5 1 Week Ago 09:49 AM
Mounting USB as a normal user rex FreeBSD General 23 5th March 2012 01:52 PM
How to Run K3B with normal user openBSD 4.4 mfaridi OpenBSD General 6 12th November 2008 10:25 PM
Wireshark not run in normal user mfaridi FreeBSD Ports and Packages 2 7th November 2008 09:49 PM
Mounting samba share as normal user rex FreeBSD General 4 27th October 2008 05:17 PM


All times are GMT. The time now is 07:55 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick