[SLE] scripting smbmounts with passwords
I'm sure there are better ways of doing this, but I think this is an instructive problem. I've been trying to hack out a perl script that will mount three NT drives on my Linux box. I can mount them by hand, but must enter a password each time. I would like to just run the script and have it enter the password for me. Any ideas? Steve -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi, On Sun, Feb 20, 2000 at 11:35 -0500, Steven T. Hatton wrote:
I'm sure there are better ways of doing this, but I think this is an instructive problem. I've been trying to hack out a perl script that will mount three NT drives on my Linux box. I can mount them by hand, but must enter a password each time. I would like to just run the script and have it enter the password for me. Any ideas?
You can use the Expect module from CPAN for that. Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Stefan, Thanks. That looks like the answer. I'm just one better than a perl novice. Do you know where I could find some sample code for this? I can figure it out, but a good example may save me a few hours. Steve Stefan Troeger wrote:
Hi,
On Sun, Feb 20, 2000 at 11:35 -0500, Steven T. Hatton wrote:
I'm sure there are better ways of doing this, but I think this is an instructive problem. I've been trying to hack out a perl script that will mount three NT drives on my Linux box. I can mount them by hand, but must enter a password each time. I would like to just run the script and have it enter the password for me. Any ideas?
You can use the Expect module from CPAN for that.
Ciao, Stefan
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
I found some great samples in the tarball. Thanks for tolerating my stupid question. Steve "Steven T. Hatton" wrote:
Stefan,
Thanks. That looks like the answer. I'm just one better than a perl novice. Do you know where I could find some sample code for this? I can figure it out, but a good example may save me a few hours.
Steve
Stefan Troeger wrote:
Hi,
On Sun, Feb 20, 2000 at 11:35 -0500, Steven T. Hatton wrote:
I'm sure there are better ways of doing this, but I think this is an instructive problem. I've been trying to hack out a perl script that will mount three NT drives on my Linux box. I can mount them by hand, but must enter a password each time. I would like to just run the script and have it enter the password for me. Any ideas?
You can use the Expect module from CPAN for that.
Ciao, Stefan
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Steven T. Hatton wrote:
I'm sure there are better ways of doing this, but I think this is an instructive problem. I've been trying to hack out a perl script that will mount three NT drives on my Linux box. I can mount them by hand, but must enter a password each time. I would like to just run the script and have it enter the password for me. Any ideas?
I'm afraid I can't give you the exact answer as my desktop is on its way to Los Angeles and I'm on a laptop in Hawaii. Here's an outline of what I did: man smbmount You can specify the password on the command line. I did this on my backup server (a computer that backs up other computers on the LAN) to backup my wife's Windows machine via a cron job. SECURITY WARNING: Obviously, this script needs to have 700 permissions with root as owner. It would not be very wise to have the normal world readable permissions for a script with another computer's password in it. -- George Toft http://www.georgetoft.com Certified NACSE Senior Network Specialist, Master of Science Information Systems Linux/Unix System Administrator Web Master Network Administrator --> Looking for the right job in Ontario, California <-- __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (3)
-
grtoft@yahoo.com
-
hattons@cpkwebser5.ncr.disa.mil
-
stefan.troeger@wirtschaft.tu-chemnitz.de