Click to See Complete Forum and Search --> : Kind of...
mangeli
12-03-2001, 12:59 PM
Ok... I need help with two things,
One, what would I put in my rc.local file so that it started a specific script as someone other than root on startup? In other words, I want it to start ghclient.x as mangeli instead of root at boot. (I would have posted this somewhere else, but this is tech. programming...)
And secondly, I need to come up with a script that will ask the user if they are in the office or not in the office and then set the network settings depending on the answer. How hard would this be?
Strike
12-03-2001, 03:17 PM
For the first question, you can simply setuid the binary as whatever user you want it to run as.
For the second one, I was considering doing this as well (because I was going to make my network settings different at home than they were at school). But, like my solution, you may have a better option. What is the difference between the two? Is there any way you can make it transparent? I basically set up DHCP on my local LAN, and that meshed perfectly with the DHCP stuff here. So, it doesn't matter where I am, booting up normally sets my network settings the same way.
mangeli
12-03-2001, 04:06 PM
Originally posted by Strike:
<STRONG>For the first question, you can simply setuid the binary as whatever user you want it to run as.
For the second one, I was considering doing this as well (because I was going to make my network settings different at home than they were at school). But, like my solution, you may have a better option. What is the difference between the two? Is there any way you can make it transparent? I basically set up DHCP on my local LAN, and that meshed perfectly with the DHCP stuff here. So, it doesn't matter where I am, booting up normally sets my network settings the same way.</STRONG>
Well, DHCP is running here in the office. However, at home, the sales people have different methods of connecting (DSL, Dialup and what not) on our current windows laptops we have a script which changes the host file depending on their location (in or out of office...) this is really what I need to come up with...