LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   userdbpw question (https://www.linuxquestions.org/questions/programming-9/userdbpw-question-338101/)

hawkpaul 06-28-2005 02:28 PM

userdbpw question
 
I asked this question in the software forum before I realized that it would be better to post it here.

I am trying to script the additon of new virtual users into my email server running postfix/courier IMAP/squirrelmail Evrything is working fine except that when I am sending this command:

userdbpw | userdb "username" set imappw=password

it prompts me to enter a password even though I have provided one in the command.

I can get it to work if I just do this:

userdb "username" set imappw=password

However when I do it that way the password that ends up in the /etc/courier/usrdb file isn't encrypted and therefore won't work.

I know this is probably some simple thing that I am missing here. Can anyone help me out?

Thanks,

Hawkinpaul

hawkpaul 06-29-2005 09:06 AM

I just got the answer from another forum. All I had to do was add echo "password" | in front of the command. So it looks like this:

echo "password" | userdbpw | userdb "username " set imappw

Hawkpaul

Thanks to bwkaz (a moderator at JustLinux.com forums)


All times are GMT -5. The time now is 01:50 AM.