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

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sun Dec 6 17:45:38 CET 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.

Assuming you're talking unix: probably setuid root, but note that some 
programs- particularly anything using gtk- don't like this.

Otherwise you're probably into the realms of SSHing to localhost, but if 
you're having to do that sort of thing you really do need to ask 
yourself whether you really want to do what you think you want to do.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list