LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Automatic password retrieval for mounting netware server (https://www.linuxquestions.org/questions/linux-newbie-8/automatic-password-retrieval-for-mounting-netware-server-131550/)

GaX 01-04-2004 08:17 PM

Automatic password retrieval for mounting netware server
 
In my .bashrc file, I have set up an alias command to mount a netware drive. It looks like this currently:

alias mount.scholar="ncpmount -C -S SCHOLAR -V USER -U $USER ~/scholar/"

However, since I have not specified a password using -P passwd, it will prompt me for a password. I want to be able to specify a password somehow similar to how I specified the user, like this:

alias mount.scholar="ncpmount -C -S SCHOLAR -V USER -U $USER -P $PASS ~/scholar/"

I don't want to simply type in my password because then it would be visible to all, but I'm not sure if I can securely put it in an environment variable as $PASS. I'm looking for ideas on how I can mount this server without manually entering a password.

Thanks

oot 01-04-2004 08:58 PM

You could put the password in a seperate file with very strict permissions and then make your script read the password out of that file.


All times are GMT -5. The time now is 06:09 PM.