Following HOWTO : Share files and folders between Computers, I've put the following line in /etc/rc.d/rc.local:
smbmount //192.168.1.46/HPmp3 mnt/HPmp3
This gets me thru steps 1-7 of the LinNeighborhood portion of the HOWTO, but I still have to do steps 8 and 10 manually every time I boot up before I can access the folder over the LAN from a Windows XP machine.
Is there a way to automate these two steps:
8. Right click on the computer name/address and select "scan as user"
10. Right click in the share you want to use and click "mount" ?
Thanks!
automate "scan as user" and "mount" in L
- Adrian Fischer
- Posts: 4
- Joined: Mon 30 Jan 2006, 01:55
Hello Carbking,
I could be wrong but...
create the share manually using the utility (cant think what its called ..) but after you have done the whole scan as user and mount thingy...in the menu across the top there is an option to export the mount script. Save that somehwere you can remember then go to etc/rc.local Work with me here as I am not a my puppy pc ...but in that file cut an copy the text from the mountscrip you save previoulsy. Then when next you boot the share is created automatically.
Did that answer the question? Sorry if it was vague but I have done it several times now on various machines and it does the trick.
I could be wrong but...
create the share manually using the utility (cant think what its called ..) but after you have done the whole scan as user and mount thingy...in the menu across the top there is an option to export the mount script. Save that somehwere you can remember then go to etc/rc.local Work with me here as I am not a my puppy pc ...but in that file cut an copy the text from the mountscrip you save previoulsy. Then when next you boot the share is created automatically.
Did that answer the question? Sorry if it was vague but I have done it several times now on various machines and it does the trick.
Adrian Fischer
Brisbane, Australia
Brisbane, Australia
Re: automate "scan as user" and "mount"
You may be missing a leading / in the path to the mount point: Trycarbking wrote:Following HOWTO : Share files and folders between Computers, I've put the following line in /etc/rc.d/rc.local:
smbmount //192.168.1.46/HPmp3 mnt/HPmp3
Code: Select all
/mnt/HPmp3
I have no idea why you need to scan anything as anybody, since you already know the computer IP address and share name that you intended to use...and hard coded them into rc.local!?8. Right click on the computer name/address and select "scan as user"
mounting the SMB share is exactly what smbmount does. So you already did that in rc.local -- if your smbmount command actually worked OK. So, my suspicion is that in fact it did not!10. Right click in the share you want to use and click "mount" ?
After booting (and so running your smbmount command in rc.local), but without using LinNeighbourhood at all, what does typing
Code: Select all
mount
If you need to specify a user to connect as, try adding -o username=whoever,password=whatever to the end of your smbmount command. Replace whoever and whatever with the desired username and password, of course.
Testing the exit status of the smbmount command and displaying a message if it is non-zero (a failure) might also be helpful?
PS. I am assuming you are running smbmount directly because the Busybox mount in Puppy isn't smart enough to invoke it for you, or has some other issue that gets in the way?? If mount will use it, then you should probably use a more generic and Unix-like mount -t smbfs command, instead. Or better yet, put a line into /etc/fstab so the share is automounted at boot along with your other fileystems -- with no need for kludged extra commands in rc.local If you could explain why you are using smbmount instead, it might be useful.
Jonathan
Adrian: thanks for your reply. Yes, that worked. In LinNeighborhood under Options there is "Export Mountscript." Thank you!
Jonathan: thanks for your reply. You mentioned:
>You may be missing a leading / in the path to the mount point
My apologies; the / was actually in there; I mis-typed in my post. From looking at the mountscript I saved using Adrian's suggestion, it appears that the problem was that it needed /root in front of what I had in rc.local.
smbmount //192.168.1.46/HPmp3 /mnt/HPmp3
should have been
smbmount //192.168.1.46/HPmp3 /root/mnt/HPmp3
Your suspicion that my smbmount command did not work was correct, and verified when I typed "mount" in a terminal window.
> If you could explain why you are using smbmount instead, it might be useful.
That's easy; I don't know what the heck I'm doing and was blindly following the example in the referenced HOWTO. I freely, if not proudly, confess my ignorance. Are these commands/topics specific to Puppy, or would reading any general book on Linux be useful?
Thanks again for your help.
Jonathan: thanks for your reply. You mentioned:
>You may be missing a leading / in the path to the mount point
My apologies; the / was actually in there; I mis-typed in my post. From looking at the mountscript I saved using Adrian's suggestion, it appears that the problem was that it needed /root in front of what I had in rc.local.
smbmount //192.168.1.46/HPmp3 /mnt/HPmp3
should have been
smbmount //192.168.1.46/HPmp3 /root/mnt/HPmp3
Your suspicion that my smbmount command did not work was correct, and verified when I typed "mount" in a terminal window.
> If you could explain why you are using smbmount instead, it might be useful.
That's easy; I don't know what the heck I'm doing and was blindly following the example in the referenced HOWTO. I freely, if not proudly, confess my ignorance. Are these commands/topics specific to Puppy, or would reading any general book on Linux be useful?
Thanks again for your help.
Al