For Programmers: Free Programming Magazines  


Home > Archive > LDAP > June 2005 > Passing password to a program









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Passing password to a program
Francisco Jose Bernabe Pellicer

2005-06-01, 9:11 am

Hi *,

I have a code (vac.pl) that executes 'vacuumdb':

if(!defined($analyze)) {


# VACUUM
$cmdline = qq/\/usr\/bin\/vacuumdb -v -d $params{"dbname"} -h
$params{"dbhost"} -p $params{"dbport"} -U $params{"dbuser"} -W
/;


} else {


# VACUUM ANALYZE
$cmdline = qq/\/usr\/bin\/vacuumdb -v -z -d $params{"dbname"} -h
$params{"dbhost"} -p $params{"dbport"} -U $params{"dbuser"} -W
/;
}
print $cmdline;
system($cmdline3);


I need to include vac.pl into the daily cron. The thing is that vacuumdb
asks for the database administrator's password. Since, according to this
code, the password is not passed, the execution of vacuumdb returns:

vacuumdb: could not connect to database GridICEdb: FATAL: password authentication failed for user "gridiceadmin"


My question is: is there a way to pass the password with the execution
of vacuumdb, so that my program can be included in the daily cron?

Cheers,


--
________________________________________
_______________
Francisco José Bernabé Pellicer
Técnico de Sistemas Grid
Departamento de Sistemas/Técnicos CESGA
Centro de Supercomputación de Galicia (www.cesga.es)
Avda. de Vigo s/n (Campus Sur)
15705 Santiago de Compostela (La Coruña)
Spain
Tlf: +34 981 569 810
Fax: +34 981 594 616
E-mail: fbernabe@cesga.es


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com