Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Using OpenSuse 10.2 in a Windows and Active Directory environment, I want to mount a couple of Windows shares as painlessly as possible. I've read lots of advice about what should be in fstab, all the relevant man pages, lots of postings, but everything I've tried so far won't work.
Here's the situation ...
At the command prompt as root, I issue the command
mount -t cifs -o user=domain\userid,pass=password //10.208.13.5/groups$ /home/zmsc1/i
That works perfectly! The share "groups$" is mounted in my home directory in the folder "i" (because the Windows users around here commonly call this share the "i" drive).
I know about credentials files, but I want to sort out the basics first.
I put that command in a script, but couldn't get it to work in that form, so I've modified the script to read
su -c "mount -t cifs -o \"user=domain\\userid,pass=password\" \"//10.208.13.5/groups\" \"home/zmsc1/i\""
Not clear to me why the escapes and quotes are needed, but they are and the script works if I call it in a terminal then when prompted provide the root password.
So my question is, how can I get that script to run on boot? I tried putting it in /etc/rc.d/rc5.d but it didn't do anything. I took out the su -c bit as there wouldn't be any way to put the root password in at boot. And I made root owner of the script. And yes, I did set the file as executable.
ok well files in rc5.d are *links* to a *service* script. service scripts respond to "start" "stop" etc.. not just a generic command. secondly you shouldn't be running it like this anyway. just add a line to your fstab file and it will naturally mount it automatically...
I'd tried before in fstab, using username=domain\\name. At the command line, you need the double backslash and I assumed it's the same in fstab. But not so! So for the benefit of others viewing this thread, if you want to mount a share on a domain from fstab, you need
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.