LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Getting Linux to connect to SMB server (https://www.linuxquestions.org/questions/linux-server-73/getting-linux-to-connect-to-smb-server-541133/)

gvaught 03-27-2007 05:58 PM

Getting Linux to connect to SMB server
 
Greetings once again. I am back with another n00b question. Seems like I work on one thing at a time and then, eventually, I get back to something I worked on two years ago and I've lost all sense about what to do in that area.

Anyway, I have a Samba file server set up and running BEAUTIFULLY (see this) for my WinXP box to connect to. And the reason I set this server up is because I wanted to have a place to put files that I need to access, regardless of which OS I booted into. Well, when I boot into Windows, life is a good enough - I can access the Samba shares, read/write, auto-connect to the network shares, the whole works.

Now, when I reboot (or the local power nazis reboot me) I come up in Linux (a stable version of Debian). All is somewhat well - although I'm sure there is a lot of optimization I could do to speed up my system and reduce my vulnerabilities. But I can not get my shares on my Samba server to auto-mount. And one of them I can't get to mount at all.

I am including a copy of my fstab (properly edited for privacy/security sake) and would like ANYONE to give me a clue as to what I'm doing wrong or haven't done right.

Code:

# /etc/fstab: static file system information.
#
# <file system>        <mount point>  <type>        <options>    <dump>  <pass>
proc                    /proc          proc            defaults        0      0
/dev/hda6              /              reiserfs        defaults        0      1
/dev/hda1              /boot          reiserfs notail          0      2
/dev/hda8              /home          reiserfs defaults        0      2
/dev/hdb1                      /opt          ext3            defaults        0      2
/dev/hda5              /root          reiserfs defaults        0      2
/dev/hda2              /tmp          reiserfs defaults        0      2
/dev/hda7              /usr          reiserfs defaults        0      2
/dev/hda3                /var          reiserfs defaults        0      2
/dev/hda9              none          swap            sw              0      0
/dev/hdc                /media/cdrom0  iso9660        ro,user,noauto  0      0
/dev/hdd                /media/cdrom1  iso9660        ro,user,noauto  0      0
/dev/fd0                /media/floppy0 auto            rw,user,noauto  0      0
//gonzo:/home/gdawg        /mnt/netG      smbfs        rw,user,username=joe,password=user,uid=1000,gid=1000                0        2
//gonzo:/home/common        /mnt/netPub    smbfs        rw,user,username=joe,password=user,uid=1000,gid=1000                0        2
//gonzo:/home/tunez        /mnt/netTunez  smbfs        ro,user,username=joe,password=user,uid=1000,gid=1000                0        2

I thought I had this working - once. But I've obviously either romanticized my past situation into a pseudo-memory or I've mucked around with it enough that it's hosed. Help.

:Pengy:

{BBI}Nexus{BBI} 03-27-2007 06:38 PM

This question may have already been asked and answered. Do a search for smb in this forum

gvaught 03-27-2007 07:02 PM

Quote:

Sorry - no matches. Please try some different terms.
I've done the preliminary search - using smb, Samba, Linux connect with Samba, and so on. Haven't found the answer to *my* question.

If there *is* a thread which addresses my particular issue, please post a link to it or some way for me to find it.

gvaught 03-27-2007 08:58 PM

OKAY!!!

As I've stated at least once before - check your stuff, have your proofreader check your stuff and then your editor. Sure, you may catch some flack from the folks around here about not reading the previous posts - Thank you, Nexus. Wish I'd thought of that. - but having someone with fresh eyes who isn't so quick to jump on you for that may notice the error in your configuration file, code or whatever you post.

Now, for the advice that would have helped me:
(1) Check to make sure you're trying to access the correct IP address. After I had installed all of my OS's, my router crapped out. Replaced with a different model, different manufacturer, different subnet - with DHCP configured to make sure everything was on the same subnet. My hosts file had NOT been updated - so my stuff was weak - on the network layer - before I ever even tried to connect. Bad techie. :(

(2) When you add the lines to include the shares in your fstab file, start the line referencing the smb share not the FQFN of the directory. OH, and the colons, I don't know where they came from but they are just a problem (see above). Those lines now read:
Code:

//gonzo/homes        /mnt/netG      smbfs        rw,user,username=joe,password=user,uid=1000,gid=1000                0        2
//gonzo/common        /mnt/netPub    smbfs        rw,user,username=joe,password=user,uid=1000,gid=1000                0        2
//gonzo/tunez        /mnt/netTunez  smbfs        ro,user,username=joe,password=user,uid=1000,gid=1000                0        2

Which is as it should be.

{BBI}Nexus{BBI} 03-28-2007 08:54 AM

Quote:

you may catch some flack from the folks around here about not reading the previous posts
My advice was not meant to be taken as flak.
Quote:

but having someone with fresh eyes who isn't so quick to jump on you for that may notice the error in your configuration file, code or whatever you post
This is true, but as you've now demonstrated, with a little patience and careful checking, you resolved your problem on your own.

If you've already done a search mention it in your post, then folks like me won't suggest you perform one.

When you resolve problems yourself, the solution is much more likely to stick in the brain. And posting the solution (as you have done) adds to the Samba knowledge base.

gvaught 03-29-2007 05:36 PM

This is true - I didn't indicate that I'd already done a search. AND I did ask for suggestions on what I hadn't done right. For anyone reading this far, take note - do your homework and then, as I have told my "underlings" time and again, document your work or no one will know you've done it. And that can be important when you charge clients by the hour. Especially so when it comes time to face the same challenge again.

RRepster 04-01-2007 06:25 PM

I found your question helpful. So I for one appreciate that you took the time to ask your question and even provided the answer after you figured it out. The responses you got is one reason why I don't visit this forum very often anymore. There's just too many elitist snobs here and they spoil everything.

gvaught 04-06-2007 08:51 PM

Same problem, new OS
 
Okay, as is typical, I had this working "good enough" so I couldn't leave it alone. Actually, I had this working very well. But there were some other things about my OS that just weren't quite "there." So, in the interest of being geekish, I decided to drop the OS I had been using for quite some time for a different flavor (aka. a new distro). Now, for those of you out there who use Ubuntu and Kubuntu and love it, God bless you. Myself, I'm plenty frackin' PO'd about it.

Anyway, to make a very long story considerably shorter - it totally blew my existing partitions off the hard drive. Or should I say, sucked them down into its black whole of "I want to be Windows" lack of configuration options. In the process, I lost my /home partition AND my /boot partition (which contained GRUB that had been painfully and successfully configured to allow me to boot to Debian on my IDE drives and WinXP on my SATA drive).

So, here I sit, working in Kubuntu and trying to get it successfully configured to access my Samba shares on another box (see above) and it simply is not working. In the interest of saving time and irritating attempts to suggest (I'm simply irritable, not that those suggestions are the problem) that I RTFM (or previous posts) let me say, "I've already done that."

My /etc/fstab contains the code listed above. When I run g:~$sudo mount -a I get the following output:

Code:

g@fozzie:~$ dmesg | tail
[17179601.088000] IPv6 over IPv4 tunneling driver
[17179611.972000] eth1: no IPv6 routers present
[17179627.020000] smbfs: mount_data version 1919251317 is not supported
[17179627.028000] smbfs: mount_data version 1919251317 is not supported
[17179651.640000] smbfs: mount_data version 1919251317 is not supported
[17180045.076000] smb_fill_super: missing data argument
[17180151.924000] smbfs: mount_data version 1919251317 is not supported
[17180235.716000] smbfs: mount_data version 1919251317 is not supported
[17180235.720000] smbfs: mount_data version 1919251317 is not supported
[17180235.720000] smbfs: mount_data version 1919251317 is not supported
g@fozzie:~$

Does ANYBODY have a clue what the issue is here? Is my smbclient incompatible with my Samba server version? Is there something else going on that I'm unaware of? Man, this is driving me nuts. Any help out there?

Micro420 04-07-2007 12:12 PM

DOn't use smbfs. Use cifs

Code:

//gonzo/homes        /mnt/netG      cifs        rw,user,username=joe,password=user,uid=1000,gid=1000                0        2
//gonzo/common        /mnt/netPub    cifs        rw,user,username=joe,password=user,uid=1000,gid=1000                0        2
//gonzo/tunez        /mnt/netTunez  cifs        ro,user,username=joe,password=user,uid=1000,gid=1000                0        2


gvaught 04-08-2007 01:54 AM

Nice one
 
But no dice. Using that code produces the following:

Code:

g@fozzie:~/Desktop$ sudo mount -a
mount: wrong fs type, bad option, bad superblock on //gonzo/homes,
      missing codepage or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

mount: wrong fs type, bad option, bad superblock on //gonzo/common,
      missing codepage or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

mount: wrong fs type, bad option, bad superblock on //gonzo/tunez,
      missing codepage or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

g@fozzie:~/Desktop$ sudo dmesg | tail
[17179612.892000] eth1: no IPv6 routers present
[17179647.588000] smbfs: mount_data version 1919251317 is not supported
[17179647.588000] smbfs: mount_data version 1919251317 is not supported
[17179647.588000] smbfs: mount_data version 1919251317 is not supported
[17180418.352000] kjournald starting.  Commit interval 5 seconds
[17180418.364000] EXT3 FS on hdb1, internal journal
[17180418.364000] EXT3-fs: mounted filesystem with ordered data mode.
[17194972.312000]  CIFS VFS: cifs_mount failed w/return code = -22
[17194972.316000]  CIFS VFS: cifs_mount failed w/return code = -22
[17194972.316000]  CIFS VFS: cifs_mount failed w/return code = -22
g@fozzie:~/Desktop$

So, where might one find an explanation of this file system type? And an explanation of the error codes it seems to be handing back?

rtspitz 04-08-2007 02:12 AM

can you access your samba shares with smbclient ?
Code:

smbclient //gonzo/homes -u username -p password

gvaught 04-26-2007 06:20 PM

no joy on using smbclient

I'm beginning to *really* not like ubuntu as a Linux version. Probably a good replacement for Windows, but is too difficult to operate in for me. I definitely prefer my original Debian install, and my old Slackware install, to my ubuntu experience. And I had such high hopes for it, given the ideology and philosophy I was seeing behind the entire "ubuntu" concept.

{BBI}Nexus{BBI} 04-26-2007 06:26 PM

Quote:

Originally Posted by gvaught
no joy on using smbclient

I'm beginning to *really* not like ubuntu as a Linux version. Probably a good replacement for Windows, but is too difficult to operate in for me. I definitely prefer my original Debian install, and my old Slackware install, to my ubuntu experience. And I had such high hopes for it, given the ideology and philosophy I was seeing behind the entire "ubuntu" concept.

Have you tried with Smb4k? After trying a few smb apps, this one works fine for me.


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