LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 10-10-2004, 02:43 AM   #1
colabus
Member
 
Registered: Mar 2004
Distribution: Debian Sarge, FC4
Posts: 100

Rep: Reputation: 15
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.
 
Old 10-10-2004, 03:18 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
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
 
Old 10-10-2004, 03:22 AM   #3
colabus
Member
 
Registered: Mar 2004
Distribution: Debian Sarge, FC4
Posts: 100

Original Poster
Rep: Reputation: 15
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..
 
Old 10-10-2004, 08:19 AM   #4
colabus
Member
 
Registered: Mar 2004
Distribution: Debian Sarge, FC4
Posts: 100

Original Poster
Rep: Reputation: 15
*help*
 
Old 10-10-2004, 08:53 AM   #5
BedriddenTech
Member
 
Registered: Aug 2003
Distribution: Slackware 9.1, 10; FreeBSD 5.2.1; Fedora Core 2; SuSE 9.1
Posts: 44

Rep: Reputation: 15
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.
 
Old 10-10-2004, 11:11 PM   #6
colabus
Member
 
Registered: Mar 2004
Distribution: Debian Sarge, FC4
Posts: 100

Original Poster
Rep: Reputation: 15
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.
 
Old 10-11-2004, 05:38 AM   #7
colabus
Member
 
Registered: Mar 2004
Distribution: Debian Sarge, FC4
Posts: 100

Original Poster
Rep: Reputation: 15
yep I tried and done what you said and failed..
 
Old 10-11-2004, 08:18 AM   #8
BedriddenTech
Member
 
Registered: Aug 2003
Distribution: Slackware 9.1, 10; FreeBSD 5.2.1; Fedora Core 2; SuSE 9.1
Posts: 44

Rep: Reputation: 15
Did you try the arguements "uid" and "ip" for -o?
 
Old 10-11-2004, 12:11 PM   #9
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
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.
 
Old 09-14-2005, 03:45 PM   #10
spade78
LQ Newbie
 
Registered: Feb 2004
Location: San Diego
Distribution: Mac OS X
Posts: 5

Rep: Reputation: 0
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!
 
Old 09-14-2005, 04:23 PM   #11
spade78
LQ Newbie
 
Registered: Feb 2004
Location: San Diego
Distribution: Mac OS X
Posts: 5

Rep: Reputation: 0
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.
 
Old 12-08-2008, 02:52 AM   #12
tcarr
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Rep: Reputation: 0
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic Mounting Windows Share using samba MediMania Linux - Software 4 11-17-2005 04:54 AM
mounting a windows (samba) share? alsjordan Linux - Newbie 3 08-06-2005 09:22 AM
Mounting Windows Network Share via Samba colabus Linux - Newbie 6 10-12-2004 09:15 PM
Mounting Samba shares and Samba Share Login time112852 Linux - Software 1 09-14-2003 03:23 PM
mounting a windows network share? graystarr Linux - Networking 2 11-09-2002 06:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration