Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm new to the Windows side of things (Server 2003), and I want to give a user account the "SeServiceLogonRight" privilege. It appears that Win32::Lanman::GrantPrivlegeToAccount might do the job for me. But I'm wondering about the status of this module. After much searching, I did eventually run across a copy of version 1.0.9 dated 2001. The README says it requires an MSVC++ compiler, which I don't have (I'm using Strawberry Perl and mingw). Does anyone still use this module, or has this it been superseded by a better module? Is there an alternate way to accomplish my task? Thanks.
  • Comment on Win32::Lanman deprecated? (granting privileges)

Replies are listed 'Best First'.
Re: Win32::Lanman deprecated? (granting privileges)
by syphilis (Archbishop) on Apr 25, 2007 at 08:05 UTC
    If you were to install ppm from CPAN ( http://search.cpan.org/~murray/PPM-2.1.8/ ), you could then install version 1.0.10.0 of Win32::Lanman into your Strawberry Perl by running:
    ppm install http://www.bribes.org/perl/ppm/Win32-Lanman.ppd
    It installed fine for me:
    C:\_32\comp>ppm install http://www.bribes.org/perl/ppm/Win32-Lanman.pp +d Installing package 'http://www.bribes.org/perl/ppm/Win32-Lanman.ppd'.. +. Bytes transferred: 226633 Installing C:\strawberry-perl\perl\site\lib\auto\win32\lanman\lanman.d +ll Installing C:\strawberry-perl\perl\site\lib\auto\win32\lanman\lanman.e +xp Installing C:\strawberry-perl\perl\site\lib\auto\win32\lanman\lanman.l +ib Installing C:\strawberry-perl\perl\html\site\lib\win32\lanman.html Files found in blib\arch: installing files in blib\lib into architectu +re dependent library tree Installing C:\strawberry-perl\perl\site\lib\win32\lanman.pm Writing C:\strawberry-perl\perl\site\lib\auto\Win32\Lanman\.packlist
    Make sure you call the module with use Win32::Lanman; (case is important).

    Cheers,
    Rob
      I'll keep trying this method, but so far I'm having trouble for one of the dependencies on ppm. XML-Parser is barfing on Expat.xs and friends. Thanks anyway.
        Yes - ppm relies on XML::Parser, which in turn needs the expat library. See http://win32.perl.org/wiki/index.php?title=Expat_Hacking for how to build XML::Parser on Strawberry/Vanilla Perl.

        I think that ppm has some other dependencies, too - but, unlike XML::Parser, they are all straightforward to build and install.

        Yet another (cheat's) method of installing XML::Parser is to download the ppm tarball from Randy Kobes ppm repository (http://theoryx5.uwinnipeg.ca/ppms/x86/XML-Parser.tar.gz), and extract the contents to the appropriate location within your perl installation. ie copy:
        1) the entire contents of the blib/arch/auto folder to C:/strawberry-perl/perl/site/lib/auto 2) the entire contents of the blib/html folder to C:/strawberry-perl/perl/html 3) the entire contents of the blib/lib folder to C:/strawberry-perl/perl/site/lib
        I'm fairly sure that particular build of XML::Parser (version 2.34) was built against a static Expat library - so you wouldn't even have to bother building the Expat library if you grab that particular distro !!

        Cheers,
        Rob
Re: Win32::Lanman deprecated? (granting privileges)
by ddn123456 (Pilgrim) on Apr 25, 2007 at 07:16 UTC
      Ntrights.exe
      I was kind-of-sort-of hoping to do everything from within Perl, so I could us PAR to pack it all up into an executable, and distribute to machines without Perl installed, without too many external dependencies.

      Thanks.