Title: Mount something with my perl script

Hello,

I don't know if this is the right mailing list, but well...

How can I mount something with my perl script?
I've got always the error: mount: only root can do this

So I changed my script something like this:

#! /usr/bin/perl -w
`su - root <password> -c 'mount -t smbfs -o  credentials=<some.file> //<windows/share> /<mount/point>'`;

If I start the script in the shell as root, it works fine.

If I start the script in the shell as some other user, it asked me for the password.

If I start the script in via the Internet-Browser, in the log files it first asked for the password and after one second it completes to "incorrect password"

How can I change my script to execute the mount command as root automatically, or to mount something within my perl script???


Thanks


Regards


Christian Heiss

_________________________________________________

LANconcept Moll GmbH
Benzstrasse 1
88074 Meckenbeuren
 
Voice:  +49 (0) 7542 940 3 - 18
Fax:    +49 (0) 7542 218 24
Mobil:  +49 (0) 171  80 64 254
<mailto:[EMAIL PROTECTED]>
visit our website <http://www.datentechnik-moll.de>
_________________________________________________



Reply via email to