Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Win32::Daemon, local machine account, password

by Tharg (Scribe)
on May 02, 2014 at 17:12 UTC ( [id://1084822]=perlquestion: print w/replies, xml ) Need Help??

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

Hi monks -

After searching for some time for a working (with my version of perl) version of this I got a version of Win32::Daemon from here (I can't remember how I found the link) :

http://www.bribes.org/perl/ppm/Win32-Daemon-20131206-PPM518.tar.gz .

I can create / start a service using the 'LocalSystem' account, by omitting the user and password as per the examples. But I can't get it to work with a user and password supplied.

I believe, perhaps wrongly, that the example provided is wrong. It says :

my %service_info = ( machine => '', name => 'PerlTest', display => 'Oh my GOD, Perl is a service!', path => $ServicePath, user => '', pwd => '', description => 'Some text description of this service', parameters => $ServiceParams );
I think that the key "pwd" should be "password". In Daemon.pm there is the code
=item C<password> The password to be used to log in the service; this is technically optional, but needs to be specified if C<user> is.

and in the documentation, "password" is discussed rather than the "pwd" used in the example. I don't have the skill to grok more than about 40% of Daemon.pm, though.

Unfortunately for me it doesn't still does't work using "password", so I'm using both keys at the moment while I try to troubleshoot what I think is an unrelated issue.

I have memories going through this on someone else's code in a previous job several years ago for several days before resolving the issue by changing to "password", so I'm hoping that someone here with the knowledge might be able to deny or confirm my suspicions there, and that if I am right, this question might save someone else some time at a later date.

Thanks!

Replies are listed 'Best First'.
Re: Win32::Daemon, local machine account, password
by socketdave (Curate) on May 02, 2014 at 18:13 UTC
    I read the docs the same way and suspect it's password and not pwd. Does an error dialog pop up? If not, do you see anything in the logs? Maybe the user you're trying to use doesn't have the right to log on as a service.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1084822]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found