[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PERL] Linux passwords



On 3 Mar 2000, sslug@sslug wrote:

> On Thu, 2 Mar 2000 18:10:25 +0100 (CET), Ole Tange <sslug@sslug>
> wrote:
>> On 2 Mar 2000, Kristian Bjørnskov wrote:
>> 
>> > On Thu, 02 Mar 2000 14:33:13 +0100, Soren Schimkat
>> > <sslug@sslug> wrote:
>> > > Er der nogen der har en ide til hvordan man ændre en brugers
>> > > password med perl?
>> > 
>> > Du kan gøre det nøjagtigt lige som i C. Du skal bruge getpwent,
>> > setpwent og endpwent til at læse i passwd filen og putpwent til at
>> > skrive i den. Se man til disse! Du skal ikke jogge meget i spinaten
>> > for at gøre dit system ubrugeligt!
>> 
>> putpwent har jeg ikke fået til at virke med perl-5.005_03.
>> 
>> Har du et lille eksempel, der virker?
> 
> Der var jeg måske lige lidt for hurtig. Jeg har kigget i gammel kode, og
> jeg kan godt se at jeg har programmeret det i c i sin tid. Det skulle dog
> ikke være det helt store problem at kunne skrive sikkert i
> /etc/passwd. Jeg tror nedenstående holder vand:
[...]

Med mindre man bruger shadow passwords, MD5, NIS, Kerberos eller andet der
ikke har de simple passwords i /etc/passwd.  Hvis det er til et lokalt
hack, så kan det være ok, men f.eks. StarOffice kigger i /etc/passwd efter
brugerinformation, og kan derfor ikke køre på et NIS-baseret system.
*growl* 

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause) | Hårdgrim of Numenor
"I do not agree with a word that you say, but I    | Retainer of Sir Kegg
will defend to the death your right to say it."    |   of Westfield
    --Evelyn Beatrice Hall paraphrasing Voltaire   | Chaos Berserker of Khorne


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:52 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *