Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
sorry, now i'm confused
ok, the being root I get, the making of the folders also. this username (kim) and password (foo), is that the username and password for the shared folder (P:\Public) on the windows pc or mine?
OK. Let me see if I've got this:
On the Windows PC there's a folder C:\K's Stuff and the PC's name in netowrk neighborhood is PC2, Username = w, Password=Windows.
My username=k and password=kriidler on my Linux PC.
Say I want to mount it on my Linux PC on /home/k/stuff.
I need to:
chmod -R 777 /home/k/stuff
mount //PC2/K's Stuff /home/k/stuff -t smbfs -o username=k,password=kriidler -o gid=users,dmask=777,fmask=777,rw
mount //PC2/K's Stuff /home/k/stuff -t smbfs -o username=W,password=Windows -o gid=users,dmask=777,fmask=777,rw
kriidler, don't take this the wrong way: I say this in kindness.
I hope that is hypothetical and not your real password because POSTING YOUR PASSWORD IS A STUPID THING TO DO. Please change your password if that is your real password. If you're on the 'net with that box, even through NAT, you've exposed yourself to additional risk of having your box "pwned"
However to answer your question:
First, you will need to escape the ' character and the space:
mount //PC2/K\'s\ Stuff
Secondly, you want to mount the WINDOWS share from your LINUX box. So, what you need to supply is the WINDOWS credentials. That means that the second example is the correct one, with the minor correction (escaping characters) required:
mount //PC2/K\'s\ Stuff /home/k/stuff -t smbfs -o username=W,password=Windows -o gid=users,dmask=777,fmask=777,rw
Also note: the "users" group for the gid= assumes that user "k" is a member of group "users".
Lastly, you can concatenate the options by replacing the " -o " before the gid= with a comma - I provided them separately in the example for the purpose of readability.
Not as a shell script, I couldn't figure out the suid thing.
I have put the commands into 2 seperate scripts, one for mounting and one for unmounting, though I need to su root before I can use them.
There still seems to be a problem with the unmounting part of things, but I think that is a general thing with my setup. Whenever I want to unmount a device I have to use
umount -f -l <mount/point/path>
even with CDs and DVDs. Some times that doesn't even work and I have to reboot the PC.