[Gllug] Tip: Scripting passwd
James McGuigan
james-lists at worldfuturecouncil.org
Thu Jul 14 00:55:17 UTC 2005
Anthony Newman wrote:
> James McGuigan wrote:
>
>> I was trying to create a script to automate account creation via a web
>> form, and this point had me stumped for a few hours, so I thought I'd
>> share it with you.
>>
>
> Why would you want to do this? I'd have thought there were much better
> ways to skin cats than with something as potentially dodgy for the
> unwary as mangling passwd files with CGI scripts...
>
>
> Ant
My intended use was with the PureFTP virtual users account (signup and
create a website with FTP account), and not the main system password
file (which is potentially dangerous). I'm trying to strike a balance
between paranoid and workable, the main item being doing admin tasks as
a non-privileged user (other than the www-data user) and only allowing
specific commands through the sudoers file.
The alternative is to require a human to authenticate all requests, and
manually ssh into the box and run such a script, its something I'll
consider before putting the site into production.
--
Rules are written for those who lack the ability to truly reason,
But for those who can, rules become nothing more than guidelines,
And live their lives governed not by rules but by reason.
- James McGuigan
Earth Emergency - A Call to Action (www.earthemergency.org)
Sustainable Society Directory (www.sustainable-society.co.uk)
World Future Council Initiative (www.worldfuturecouncil.org)
Open co-op (http://open.coop)
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list