Front page | perl.beginners |
Postings from April 2003
passing a password
Thread Next
From:
Jeff Hardy
Date:
April 30, 2003 05:26
Subject:
passing a password
Message ID:
1051705651.4108.31.camel@comp11847.potsdam.edu
I have a quick question. I am writing a script that calls a little C
program (in this case, the cups utility cupsaddsmb). I call the program
with no problem using a system call like so:
system("/usr/sbin/cupsaddsmb -U admin $queue");
$queue is the printer i want to add. The problem is that the cupsaddsmb
utility prompts for a password. How can I send that password along to
the program? I tried making my system call with a pipe to an echo
password like this:
system("/usr/sbin/cupsaddsmb -U admin $queue | echo password");
Any help would be greatly appreciated. Thanks.
--
Jeff Hardy <hardyjm@potsdam.edu>
SUNY Potsdam
Thread Next
-
passing a password
by Jeff Hardy