LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-25-2006, 08:14 AM   #1
drewhead
LQ Newbie
 
Registered: Jan 2006
Distribution: Slackware
Posts: 21

Rep: Reputation: 1
Question Unable to mount via cifs but fine with sbmfs


I've redesigned my home lan to have a slack box with some big storage that my other slack box(s) and a WinXp machine share and GigE to move things around. I quickly hit the 2GB smbfs limitation copying around some DVD images. Opps. So I googled a bit and found CIFS.

From my reading I believe it is correct that the kernel option for cifs is needed on the client only. So I went and recompiled my kernel, 2.6.15.1, with the cifs option (and statistics just for fun) and tried changing my fstab to use cifs.

The two slackware 10.2 boxes in question here are moat, the server, and tower, the client, each running 2.6.15. Each are identified correctly in thier respective /etc/hosts file.

This is the old samba mount:
Code:
//moat/safe     /safe            smbfs       credentials=/etc/samba/moat_credentials,rw         1   1
and works fine (right up to 2G).

This is the modified cifs mount
Code:
//moat/safe     /safe            cifs       credentials=/etc/samba/moat_credentials,rw         1   1
This wont mount.

Code:
root@tower:/etc/samba# mount /safe
mount: wrong fs type, bad option, bad superblock on //moat/safe,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
syslog says:
Code:
Jan 25 08:36:58 tower kernel:  CIFS VFS: No username specified 
Jan 25 08:36:58 tower kernel:  CIFS VFS: cifs_mount failed w/return code = -22
The things I've been reading say this should pretty much work? Do I need to compile cifs on the server as well? What's the simple step I seem to have missed? (it's always the little things...)
 
Old 01-25-2006, 02:01 PM   #2
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-13.1
Posts: 1,010

Rep: Reputation: 45
cifs can be loaded by module
modprobe cifs
add that to the end of /etc/rc.d/rc.modules

yes you should have it loaded on the server and client.

if you still have trouble try the mount by keying in the user/pass, perhaps a differnt credentials file may be needed.
 
Old 01-26-2006, 10:04 PM   #3
drewhead
LQ Newbie
 
Registered: Jan 2006
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 1
I compiled cifs as a module on my server. I modprobed it, lsmod show it loaded. I then rc.samba restart 'ed.

No change in error on my client when mounting via fstab, but I can craft a command line with mount.cifs that works.

Code:
mount.cifs //moat/safe /safe -o user=xxxx,password=xxxx,rw
Yet this fstab line:
Code:
//moat/safe /safe cifs user=xxxx,password=xxxx,rw 1 1
doesn't mount, but . Any idea how I can make this work in fstab so it will happen at boot?
 
Old 01-27-2006, 04:11 AM   #4
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,382
Blog Entries: 1

Rep: Reputation: 60
Use the auto parameter !
//moat/safe /safe cifs auto,user=xxxx,password=xxxx,rw 1 1
 
Old 01-27-2006, 07:31 AM   #5
drewhead
LQ Newbie
 
Registered: Jan 2006
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by marozsas
Use the auto parameter !
//moat/safe /safe cifs auto,user=xxxx,password=xxxx,rw 1 1
Cool! That works. Interestingly option auto is absent from man mount.cifs (yea I know it's in man mount). For anyone else happening by this thread, I did discover that I needed mount.cifs in my path and then calling mount (instead of explicitly mount.cifs) worked.

I have even been able to pull the auth info out of fstab and in to a credentials. Apparently cifs doesn't like the spaces in
Code:
username = xxxx
which worked fine in smbfs so I had to use
Code:
username=xxxx
.

Thanks for the tips guys.

Last edited by drewhead; 01-27-2006 at 07:37 AM.
 
Old 01-27-2006, 08:57 AM   #6
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,382
Blog Entries: 1

Rep: Reputation: 60
credentials looks like nice !

I don't know how to use this thing credentials instead passwords on the fstab. It's sounds great !
Could you explain how to use it, please ?

thanks !
 
Old 01-27-2006, 09:31 AM   #7
drewhead
LQ Newbie
 
Registered: Jan 2006
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by marozsas
I don't know how to use this thing credentials instead passwords on the fstab. It's sounds great !
Could you explain how to use it, please ?

thanks !
Create a file and put two lines in it,
Code:
username=xxxx
password=xxxx
and restrict it to read only owner by root (for automounting at boot). I placed mine in /etc/samba/<servername>_credentials

Then replace username=xxxx,password=xxxx in the option of your fstab with credentials=/etc/samba/<servername>_credentials, or whatever you created your file as.

Assuming you manage your permissions correctly the system can auto mount the share at boot, users can see the line in fstab, but not the user/pass used to login.

Good luck.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mount smbfs vs cifs Zurvan Linux - Networking 2 12-29-2006 02:46 PM
suse 10.0; first cd installs fine, others don't, cannot mount them ajagodnik Suse/Novell 5 10-17-2005 10:38 AM
Mount CIFS partition as user: Invalid or missing username paco36 Linux - General 2 07-04-2005 12:31 AM
long remote mount time for samba with cifs command luna6 Linux - Networking 1 04-01-2005 11:43 AM
unable to fine lan card sajib Linux - Networking 1 07-10-2003 07:51 PM


All times are GMT -5. The time now is 04:57 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration