Re: syscall getpwnam and changing authetication on system

2007-05-23 Thread Tom Phoenix
On 5/22/07, Martin Barth <[EMAIL PROTECTED]> wrote: afer trying a lot of stuff i figured out that following code line works: my ($login,$pass,$uid,$gid) = (getpwnam($user),rand); without rand it's still the old user... can anyone explain why perl seems to cache this? (even without eval) Wel

Re: syscall getpwnam and changing authetication on system

2007-05-22 Thread Martin Barth
Hi, afer trying a lot of stuff i figured out that following code line works: my ($login,$pass,$uid,$gid) = (getpwnam($user),rand); without rand it's still the old user... can anyone explain why perl seems to cache this? (even without eval) Tom Phoenix schrieb: > On 5/18/07, Martin Barth <[EMA

Re: syscall getpwnam and changing authetication on system

2007-05-19 Thread Martin Barth
Hello Tom, > On 5/18/07, Martin Barth <[EMAIL PROTECTED]> wrote: > > > print "** " . eval("getpwnam('christian')") ."\n"; sleep 10; > > Why are you (mis-)using the evil eval? > > > if I do a perl -wle 'print getpwnam("christian")' the correct (new) uid is > > returned. > > So,

Re: syscall getpwnam and changing authetication on system

2007-05-18 Thread Tom Phoenix
On 5/18/07, Martin Barth <[EMAIL PROTECTED]> wrote: print "** " . eval("getpwnam('christian')") ."\n"; sleep 10; Why are you (mis-)using the evil eval? if I do a perl -wle 'print getpwnam("christian")' the correct (new) uid is returned. So, if you don't use the evil eval,

syscall getpwnam and changing authetication on system

2007-05-18 Thread Martin Barth
I am changing the authetication typ, from local to remote ldap on a pc. I want to get the new userid of a user, therefore i have following code. system ("/etc/init.d/nscd stop"); system ("/etc/init.d/winbind restart"); print "**" . getpwnam("christian") ."\n"; ## code that changes from l