Linux - Software This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
10-10-2004, 02:43 AM
|
#1
|
Member
Registered: Mar 2004
Distribution: Debian Sarge, FC4
Posts: 100
Rep:
|
Mounting Windows Network Share via Samba
Howdy,
I'm running Debian 3r2 and I have Samba 3.0 installed. My first thing I wanted to mess with was access the share. It took some messing arounf but finally I apt-get smbfs and installed that, also smbclient. (No restart).
So I entered in as root:
Code:
smbclient -U "Windows Username" \\\\192.168.0.1\\mp3
and that worked fine. The next thing I wanted to see if I could do was mount the share and this is what I'm having trouble with. The whole time I was working with a friend trying to do the same thing on the same OS and his attempts were successful, however he wasn't access Windows rather OS/2 share.
I tried and failed with.
Code:
xionous:~# smbmount //192.168.0.1/mp3 /mnt/ -o username="Windows Username",password=windowspassword
cli_negprot: SMB signing is mandatory and we have disabled it.
27906: protocol negotiation failed
SMB connection failed
Also tried with the same result
Code:
mount -t smbfs -o username="Windows Username",password=windowspassword //192.168.0.1/mp3 /mnt/
cli_negprot: SMB signing is mandatory and we have disabled it.
27960: protocol negotiation failed
SMB connection failed
and I tried just placing it into /etc/fstab too and mount -a, but no good either.
I've had a look around and found this to be a common issue. I had a look through the samba help documentation too but didn't find too much on it. So I ask, does anyone know a way to work around this, or what i'm doing wrong, or even some links to work it out.
Anyhelp would be really appreciated. Thanks.
|
|
|
10-10-2004, 03:18 AM
|
#2
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
hi there
this worls for me
[root@gaurav php]# smbmount '//192.168.0.1/SharedDocs' /mnt/c
Password:
[root@gaurav php]#
i am in a workgroup and the windos machine does not have any login policy
so i do not require username or password
also the name of the windows share is case sensitive
regards
|
|
|
10-10-2004, 03:22 AM
|
#3
|
Member
Registered: Mar 2004
Distribution: Debian Sarge, FC4
Posts: 100
Original Poster
Rep:
|
consider yourself lucky then..
I read a little more and found cifs to use, I setup that and now:
Code:
cifsmount //192.168.0.1/mp3 /ntwk/ -o user="Windows Username"
Password:
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
* Note I have made the /ntwk/ dir under root since..
|
|
|
10-10-2004, 08:19 AM
|
#4
|
Member
Registered: Mar 2004
Distribution: Debian Sarge, FC4
Posts: 100
Original Poster
Rep:
|
*help*
|
|
|
10-10-2004, 08:53 AM
|
#5
|
Member
Registered: Aug 2003
Distribution: Slackware 9.1, 10; FreeBSD 5.2.1; Fedora Core 2; SuSE 9.1
Posts: 44
Rep:
|
The Problem might be your Windows box, just because I'm always having trouble when trying to mount some windows shares... So: Make sure your dir is really a share, make sure your win box does not have any per-computer policy enabled (e.g., try to enable your guest account) and try mounting that share with another win pc, just to make sure. Keep me up-to-date, please.
|
|
|
10-10-2004, 11:11 PM
|
#6
|
Member
Registered: Mar 2004
Distribution: Debian Sarge, FC4
Posts: 100
Original Poster
Rep:
|
just at work atm i'll try the guest account trick when i get back home. I have accessed the share too using smbclient and was about to explorer it fine. I just don't understand how I can accessed the share using the client however I can't mount it. So yes the share is actually there.
|
|
|
10-11-2004, 05:38 AM
|
#7
|
Member
Registered: Mar 2004
Distribution: Debian Sarge, FC4
Posts: 100
Original Poster
Rep:
|
yep I tried and done what you said and failed..
|
|
|
10-11-2004, 08:18 AM
|
#8
|
Member
Registered: Aug 2003
Distribution: Slackware 9.1, 10; FreeBSD 5.2.1; Fedora Core 2; SuSE 9.1
Posts: 44
Rep:
|
Did you try the arguements "uid" and "ip" for -o?
|
|
|
10-11-2004, 12:11 PM
|
#9
|
Senior Member
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765
Rep:
|
Quote:
Try something along the lines of:
# smbmount //machine/share /mnt/samba -o
username=user,password=sharepass
where //machine/share is the computer name (or ip) and sharename on
the XP box, and /mnt/samba is the directory on the linux box to
attach the filesystem -- i.e. the place where you want the files to
show up. (Directories under /mnt are a common place to mount other
filesystems; just make sure /mnt/samba exists before trying to mount
to that directory -- i.e. "mkdir -p /mnt/samba" )
2 Side notes:
Side note 1) Now that smbfs is installed, you can do the same thing
as smbmount with the standard "mount" command with a syntax like:
# mount -t smbfs -o username=user,password=sharepass //machine/share
/mnt/samba (looks very similar to the aforementioned smbmount command, eh?)
This has the advantage in that you could place the appropriate values
in the /etc/fstab file and have the XP share auto-mounted[1].
[1] - this is not the same as an automount daemon. And entries in
/etc/fstab are only "auto" mounted once when the system starts up.
Side note 2) The reading and writing of NTFS partitions is different
than "reading and writing" over a network. SMB is the windows
networking protocol (and where the name "SaMBa" is derived). A SMB
client's only job is to format the packets for the network, it's the
server's job to read and write to the local filesystem. So, your
linux box is not really reading/writing to NTFS, your XP box is doing
that. The only time there's an interaction between linux and NTFS is
when the local drives have an NTFS partition (think dual-boot) and up
until recently the only safe interaction has been read-only. Full
read/write can be accomplished with a userspace NTFS filesystem
wrapper for the native NTFS.sys windows binary.
|
that is from my LUG, i was having the same problems as you. doing it this way was very very easy for me to setup.
just remember to make the dir you want to mount the share to prior to trying to mount it.
i normaly just mount to my /home/user/sharename because i am just mounting things like my music and videos for my media project debian box.
for me i do the following:
Code:
mkdir /home/user/share
smbmount //192.168.x.x/share /home/user/share
and that will take my windows share from IP/shared folder and mount it in my users home directory share name.
best of luck.
|
|
|
09-14-2005, 03:45 PM
|
#10
|
LQ Newbie
Registered: Feb 2004
Location: San Diego
Distribution: Mac OS X
Posts: 5
Rep:
|
I'm also trying to mount to a WinXP box through a RedHat 7.1 box setup as my file server. Where I run into problems though is that I want to give a normal user permission to mount the shared folder and access the contents within (while I am the admin and the user, I just want to avoid having to be su everytime I want to mount the shared folder).
While I have no problem mounting the WinXP share folder executing the smbmount command as root, I can't execute the mount operation as a normal user. Once I successfully mount the shared folder (as root) access as a normal user isn't a problem since I specify the uid and gid options. This is the error I get when I execute the smbmount command as a normal user:
smbmnt must be installed suid root for direct user mounts (504,504)
smbmnt failed: 1
I know I can execute the mount command as a normal user so I added this /etc/fstab entry for the shared folder:
//xpBox/LinuxShare /home/login/xpshare smbfs noauto,user,username=xpLogin,uid=linuxLogin,gid=users 0 0
but I run into the same error listed above when I run the command "mount xpshare" as a normal user. Again I can mount the folder successfully as the root user but I'm trying to cut that step out. Anybody know if I'm doing something wrong?
By the way, thanks to all the previous posters, the instructions were a lot of help in getting me this far!
|
|
|
09-14-2005, 04:23 PM
|
#11
|
LQ Newbie
Registered: Feb 2004
Location: San Diego
Distribution: Mac OS X
Posts: 5
Rep:
|
Hello again. Y'know it figures that ten minutes after I post my last message, I run across this article:
http://www.linuxquestions.org/questi...icle&artid=395
which answers my question about user mounting of SMB file shares (last item at the end).
So here's what I've done to get access to my WinXP box:
(1) Created a shared folder with R/W permissions on the WinXP box
(2) Added a line for the shared folder in my /etc/fstab file (see my previous post).
(3) Did a chmod o+s /usr/bin/smbmount (did the same with smbumount as well)
Now I can mount and access the shared folder as a normal user.
Regards.
|
|
|
12-08-2008, 02:52 AM
|
#12
|
LQ Newbie
Registered: Dec 2008
Posts: 3
Rep:
|
Help with fstab file
I've been reading the posts in this forum and trying to auto mount my Windows XP drive using a Debian Linux machine.
I can login to the root terminal and use the command
mount -t smbfs -o username=user,password=sharepass
However when I put this line in the ect/fstab file, it doesn't cause the drive to auto mount on boot. I.e. I have to login to the root terminal and manually cause the drive to mount every time.
Any ideas or suggestions on how to make my fstab entry work so the network drive boots on startup?
Note I am a real rookie with Linux, so I may ask dumb follow up questions.
Thanks!
|
|
|
All times are GMT -5. The time now is 03:43 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|