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!
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.
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:
su root
cd /home/k/
mkdir stuff
chmod -R 777 /home/k/stuff
and finaly
mount //PC2/K's Stuff /home/k/stuff -t smbfs -o username=k,password=kriidler -o gid=users,dmask=777,fmask=777,rw
or
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:
Code:
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.
Hi KimVett.
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
Code:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.