[fpc-pascal]Password changing

Vassilis Stathopoulos vstath at irismedia.gr
Thu Jun 6 21:51:48 CEST 2002


Perhaps you could try something like this:

program changemypasswd;

uses Linux;

var f : text;

begin
     Popen(f, '/usr/bin/passwd --stdin userid > /dev/null','w');
     writeln(f, 'password');
     Flush(f);
     Close(f);
end.

It must work - test yourself to make sure it is working.

If you like you can email me privately with info regarding the project 
you're making - perhaps I do have code to share (if I guess correctly what 
you are building).

Vassilis




>Hello folks,
>
>How could I change a linux user password (with shadow) in a fpc program?
>
>Thanx
>
>Helio
>
>_______________________________________________
>fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>http://lists.freepascal.org/mailman/listinfo/fpc-pascal





More information about the fpc-pascal mailing list