LinHES Forums http://forums.linhes.org/ |
|
SMB mount on boot without password, possible? http://forums.linhes.org/viewtopic.php?f=17&t=5002 |
Page 1 of 1 |
Author: | avocade [ Wed Jun 22, 2005 7:59 am ] |
Post subject: | SMB mount on boot without password, possible? |
Getting crazy over this, but here it goes: Trying to mount an mp3-folder from a WindowsXP-based SMB-shared computer over the network at boot from /etc/fstab. Problem is, it doesn't have a password since it's guest-accessed. But the fstab doesn't seem to like that, since if I leave the password field blank it asks me for a password IN THE BOOTSEQUENCE, and it's pretty hard to input a password with a remote... So, is there a way to make it accept a blank password and just mount the darn smb-volume? Here's the command I give in fstab: Code: //Swiftfoot/mp3 /myth/music/swiftfootmp3 smbfs username=swiftfoot,password=
//Swiftfoot/ra_5 /myth/video/motion/swiftfootvideo smbfs username=swiftfoot,password= |
Author: | ceenvee703 [ Wed Jun 22, 2005 11:18 am ] |
Post subject: | |
What if you don't include the "password=" option in fstab? |
Author: | avocade [ Wed Jun 22, 2005 12:08 pm ] |
Post subject: | |
Sorry, mixed them up. If I HAVE the password= then it says "authentication failed" when booting up. If I DON'T have password= at all then it stops at boot and asks for a password. Solved this intermittently by simply adding a cronjob ever 5 minutes to mount the smb-shares with smbmount. Works fine, but it's a bit kludgy. |
Author: | Xsecrets [ Wed Jun 22, 2005 12:20 pm ] |
Post subject: | |
a little better solution than a cron job would be to mount them in bootmisch.sh if you can do it in cron you should be able to do it there, and it only runs once on boot instead of running every 5 minutes. |
Author: | avocade [ Wed Jun 22, 2005 12:50 pm ] |
Post subject: | |
Can't find the bootmisch.sh anywhere on the drive. find / -name "bootmisch.sh" |
Author: | scotbrady [ Wed Jun 22, 2005 1:03 pm ] |
Post subject: | |
/etc/init.d/bootmisc.sh |
Author: | nbdwt73 [ Wed Jun 22, 2005 1:05 pm ] |
Post subject: | |
I have used both the bootmisc.sh (/etc/init.d) as well as the fstab method... Both work fine but if you are going to use fstab, I found it works better if you create a "credentials file" (in the example below it is /home/smb.txt) and use "credentials=" in the statement instead of "password="... # /etc/fstab: filesystem table. # # filesystem mountpoint type options dump pass /dev/hda1 / ext3 defaults,errors=remount-ro 0 1 /dev/hda3 /cache auto defaults,auto 0 2 /dev/hda4 /myth auto defaults,auto 0 2 //mythserv/music /mnt/music smbfs credentials=home/smb.txt 0 0 //mythserv/gallery /mnt/gallery smbfs credentials=home/smb.txt 0 0 //mythserv/tv /mnt/tv smbfs credentials=home/smb.txt 0 0 //mythserv/video /mnt/video smbfs credentials=home/smb.txt 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 /dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022 0 0 /dev/cdrom /cdrom iso9660 defaults,ro,user,noexec,noauto 0 0 # Added by KNOPPIX /dev/hda2 none swap defaults 0 0 |
Author: | Xsecrets [ Wed Jun 22, 2005 1:39 pm ] |
Post subject: | |
my bad typo but it's already been corrected above. |
Author: | avocade [ Wed Jun 22, 2005 2:18 pm ] |
Post subject: | |
Np, thanks guys. Guess I'd be well off learning some deduction ![]() Btw, the smb-server will go on/off intermittently so perhaps I'm better of with a cron-job after all ![]() OT, but the only problem I have now is that myth locks up time and again for sometimes a minute, most often while showing the program viewer and weather, and strangely enough when pressing esc while on the root-menu (to shut mythfrontend off). I don't have access to a terminal window so I can't see if there are any problems. Know how to access one from within the mythfrontend app? |
Author: | Xsecrets [ Wed Jun 22, 2005 2:29 pm ] |
Post subject: | |
no you can't access an xterm from within mythtv, however if you ssh in you can look at /home/mythtv/.xsession-errors (might be slightly wrong it's from memory) and it should show most of the errors. |
Author: | knathraak [ Wed Jun 22, 2005 2:55 pm ] |
Post subject: | |
Just a few suggestions: If it's linux to linux, have you considered nfs? It really works much more seemlessly in a pure linux/unix enviroment as far as permissions/ownership, etc. If that won't work for you, I'm sure you have your reasons. Also be sure to chown root:root your credentials file and chmod 400, since it will have the password in clear text. In some situations, I can't remember which ones, if the password has special characters like $ or other characters that the shell interprets, you may have to escape those characters to take away their special meaning. So if your password is pa$$w0rd, you would need to put pa\$\$w0rd. I think the credentials file is one of these situations. And lastly while I haven't used smbfs that much (I use it extensively in windows->linux though) if it behaves like nfs, your smb server going down intermittently can make things very unhappy on the client side, especially if you're reading or writing a file on the server, or sitting in a directory on the server. On the other hand if the server goes down and comes back up later the share *should* still be mounted. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |