SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'd like to mount a smb share from a windows machine when my suse10.2 laptop boots ... I tried adding a line to my fstab but because I use wireless to connect to my lan and fstab is read before wlan0 is up ... it doesn't mount the share ... If I run mount -a from a root-terminal the share would mount fine so I know the line I had in fstab was good...So I figured a script to mount the share would work if it was the last one before kde loads, that way wlan0 is up and connected...but I don't know what to put in the script or where to put the script so it can be ran. I tried a script like:
#! bin/sh
mount -t cifs 192.168.2.07/MP3s /home/myuserid/music
and I put this in /ect/init.d
that didn't work so I moved the script to /ect/rc5.d so it would load when I go into runlevel 5 but this also didn't work ... I also tried it with the script in both places ... still didn't work ...So now I'm posting here .... I don't know if the little script I wrote is wrong or if I put it in the wrong place or both... Any help or ideas would be great .... Thanks
You can put it in /etc/rc.local or look at /etc/init.d/rc.local to see what it does (on my machine it calls /etc/rc.local) in case you don't have this file.
mount -t cifs 192.168.2.07/MP3s /home/myuserid/music
Does this command works from a shell?
I would
1) put this in /etc/fstab
//srv/share /home/myuserid/music cifs noauto,user=DOMAIN\user,iocharset=utf8,uid=<xxx>,gid=<xxx> 1 2
2) put this in /etc/rc.local:
mount /home/myuserid/music
which is the script that loads/starts the smb daemon and I added
mount -t cifs //192.168.2.07/MP3s /home/myuserid/music
in the start loop and I put the umount command in the stop loop
now when I boot I get to a spot that asks for the root password ... then goes on and loads kde ... if I then do a ctrl-alt-f1 I see that its still waiting for the password I enter it then alt-f7 to get back to the gui it works .... when I try the command
mount -t cifs //192.168.2.07/MP3s /home/myuserid/music
from a ROOT terminal it still asks for root's password ... if I could get past the password stuff I should be all set ....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.