LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   smbmount in script not working (https://www.linuxquestions.org/questions/linux-newbie-8/smbmount-in-script-not-working-266805/)

adriaanbw 12-15-2004 04:27 PM

smbmount in script not working
 
Hi all,

I have placed two smbmount commands in a script so i can quickly mount two networked windows shares, so yes i have created the /mnt points. However, the script doesnt seem to run properly.

when i run the two commands individually in a terminal they work fine. I realise that i must be root to smbmount, but even when i execute the script in a term as su, still doesnt work.

script is pasted below.
thanks
------

#!/bin/bash

smbmount //aaa.bbb.ccc.ddd/windocs /mnt/windocs -o username=XXXX,password=YYYY
smbmount //aaa.bbb.ccc.ddd/Scratch /mnt/scratch -o username=XXXX,password=YYYY

Tinkster 12-15-2004 04:32 PM

Error-messages, any output at all?

Best of copy & paste the output of your terminal
session (remove critical info again).


Cheers,
Tink

sigsegv 12-15-2004 04:34 PM

What does your shell output when you run the script? "still doesn't work" isn't much to go on.

adriaanbw 12-15-2004 04:43 PM

right you are. sorry folks, but to be honest there is no output. the only evidence i have that its not running the command properly is that when i type:

ls /mnt/windocs (and likewise for other share)

i get nothing. no files listed. after running each command individually, i get a full listing.

Tinkster 12-15-2004 04:47 PM

Mate!

Just give us the transcript of the session :}


Cheers,
Tink

sigsegv 12-15-2004 05:30 PM

Ok, let's assume there are really no errors...

Run your script and post the output of mount

adriaanbw 12-15-2004 06:47 PM

hi all,

so i have been playing around with it some more and i am not sure what i did but i believe it now works

i had an su command in the script ahead of the smbmount commands. so after running that in the terminal i was of course still as 'root'. running mount at that point showed no network shares mounted. when i exited back to my user account, and then ran mount again it showed the shares.


it seems very odd but as i said earlier, there was never any errors so i guess it was always working, just i wasnt able to see them immediately.

thanks for your time though. i appreciate your efforts


All times are GMT -5. The time now is 11:00 PM.