From: Damjan Rems Date: 2007-06-14T04:44:47+09:00 Subject: Re: executing sudo from ruby Alex Young wrote: > anansi wrote: >> the thing is that everything needs to be done by this script and no >> further command. So can an app give it self the root uid at runtime? > After a little experimentation (on Ubuntu), it would seem that the only > way to get my suggestion to work is by creating a setuid link to the > ruby binary, and using that to run the script. That's just as insecure > as keeping a password in a file, so I take back my suggestion entirely. > > A slightly less unsafe method (but still rather iffy) would be to create > a public key for the root account, and do everything over SSH. That way > you can arrange to only need to authenticate once per session (or, if > you really want to play fast and loose, leave the private key with an > empty passphrase). I don't know if that helps at all... > > -- > Alex How about running job in a cron under root user. sudo kcron (in kde) will start kcron in mode where you can schedule a job to run as any user. by TheR -- Posted via http://www.ruby-forum.com/.