At 05/16/2001 10:44 AM, Ryan, David wrote:
>Thank you very much. I was trying to do it with NetAdmin, but it appears
>that NetAdmin cannot delete the value. I have since modified my code per
>your suggestion, tested it, and it did work. Thanks again.
I just noticed a problem with the code I sent you. If the run the script
as is, the password will be reset to null?!? According the documentation,
"The password is never returned in a UserGet() operation." Therefore, the
password in %acct_info is blank and this is what is saved with the
UserSetInfo function.
Can anyone else confirm this? Is there a way around this? Surely, you
must be able to set the attributes without erasing the password every time.
I confess, I have only used Win32API::Net in test mode. I guess I have
never attempted to login an account after I changed some properties.
Hopefully, this did not cause problems for anyone...
rotaiv.
> > -----Original Message-----
> > From: rotaiv [SMTP:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 16, 2001 9:50 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Delete Logon Script Name in UMFD
> >
> > At 05/16/2001 08:58 AM, Ryan, David wrote:
> >
> > >Thank you very much for the reply, but I still have the same question.
> > What
> > >value do I set $scriptPath to so that it will delete the existing value
> > in
> > >UMFD? Neither undef, " ", "" or anything else I have tried mimics the
> > >manual action of entering UMFD and deleting the existing value. Thanks
> > >again.
> >
> > I don't use NetAdmin much as I prefer Win32API::Net. I tested the
> > following code and I was able to delete the script path. As far as I can
> > determine, the following code will delete the script path the same as
> > using
> > UMFD. This is only for a single user but you could enumerate the users in
> >
> > the same fashion you did with NetAdmin.
> >
> > rotaiv.
> >
> > # Begin sample code
> >
> > use Win32API::Net qw(UserGetInfo UserSetInfo);
> >
> > # Change <server> to a PDC or BDC
> > $server='\\\\<server>';
> >
> > # Change <userid> to your test user
> > $user_id='<userid>';
> >
> > # Retrieve extended settings
> > UserGetInfo($server, $user_id, 3, \%acct_info) || die;
> >
> > # Reset login script path
> > $acct_info{scriptPath}='';
> >
> > # Save extended settings
> > UserSetInfo($server, $user_id, 3, \%acct_info, $error) || die;
> >
> > # End sample code
> >
> > _______________________________________________
> > Perl-Win32-Admin mailing list
> > [EMAIL PROTECTED]
> > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin