Re: [fpc-pascal] shell script with root rights and automatic password

2015-12-07 Thread Rainer Stratmann
On Monday 07 December 2015 08:38:28 you wrote: > Rainer Stratmann wrote: > > What works is an entry in the sudoers file. > > And then the program/script you can call with root rights. > > I hope this is for something that will only ever run on your own > machine, because unless you take a lot of

Re: [fpc-pascal] shell script with root rights and automatic password

2015-12-06 Thread Marc Santhoff
On So, 2015-12-06 at 17:20 +0100, Rainer Stratmann wrote: > How to do this? > > I would like to run a script with root rights from an application. > The password should be transferred automatically. Others told that unix doesn't allow skripts run as root. For your task sudo may help. With it

[fpc-pascal] shell script with root rights and automatic password

2015-12-06 Thread Rainer Stratmann
How to do this? I would like to run a script with root rights from an application. The password should be transferred automatically. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] shell script with root rights and automatic password

2015-12-06 Thread Mark Morgan Lloyd
Rainer Stratmann wrote: How to do this? I would like to run a script with root rights from an application. The password should be transferred automatically. Assuming you're talking unix: probably setuid root, but note that some programs- particularly anything using gtk- don't like this.

Re: [fpc-pascal] shell script with root rights and automatic password

2015-12-06 Thread Michael Van Canneyt
On Sun, 6 Dec 2015, Rainer Stratmann wrote: How to do this? I would like to run a script with root rights from an application. The password should be transferred automatically. As far as I know, this cannot be done except by making the application itself setuid root. If you create a

Re: [fpc-pascal] shell script with root rights and automatic password

2015-12-06 Thread Rainer Stratmann
On Sunday 06 December 2015 19:15:45 you wrote: > On So, 2015-12-06 at 17:20 +0100, Rainer Stratmann wrote: > > How to do this? > > > > I would like to run a script with root rights from an application. > > The password should be transferred automatically. > > Others told that unix doesn't allow

Re: [fpc-pascal] shell script with root rights and automatic password

2015-12-06 Thread Jonas Maebe
Rainer Stratmann wrote: What works is an entry in the sudoers file. And then the program/script you can call with root rights. I hope this is for something that will only ever run on your own machine, because unless you take a lot of precautions (hardcoding a set of *absolute* paths to