LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-25-2008, 09:50 AM   #1
lefty.crupps
Member
 
Registered: Apr 2005
Location: Minneap USA
Distribution: Debian, Mepis, Sidux
Posts: 470

Rep: Reputation: 32
Unhappy Samba mounts (via fstab) makes files into dirs, and other problems


Running a Red Hat Enterprise Linux 5.1 (64bit) system and trying to mount network shares from a Windows 2003 server. I can mount these shares, but browsing them is an issue -- I can CD to non-existant dirs, and files are being displayed as directories as well. Here is some info and examples:

Code:
[root@plus ~]# cat /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/var              /var                    ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda3         swap                    swap    defaults        0 0
\\exchange\import  /mnt/import  cifs  username=Samba,gid=500,password=PASS,uid=500,file_mode=0777,dir_mode=0777  0  0
\\exchange\mmnew  /mnt/mmnew  cifs  user,username=Samba,gid=500,password=PASS,uid=500,file_mode=0777,dir_mode=0777  0  0
\\exchange\broke  /usr/MAIL.ATTACH  cifs  username=Samba,gid=500,password=PASS,uid=500,file_mode=0777,dir_mode=0777  0  0
\\exchange\data  /mnt/data  cifs  username=Samba,gid=500,password=PASS,user,uid=500,file_mode=0777,dir_mode=0777  0  0

[root@plus ~]# file /mnt/data/0220EM.CSV
/mnt/data/0220EM.CSV: directory

[root@plus ~]# cd /mnt/data/0220EM.CSV

[root@plus 0220EM.CSV]# ls
0220EM.CSV
061307.CSV
061307.xls
....
....

0220EM.CSV is NOT a directory but a file. Additionally, if I CD to that directory and 'ls' there it gives me the same output as the /mnt/data/ directory does, meaning its recursing upon itself or something.

Additionally I can 'cd /mnt/data/fakedir/' and (1) it actually goes there, and (2) 'ls' gives the same output as 'ls /mnt/data/'

This is obviously very wrong. Can anyone help me?
 
Old 04-26-2008, 07:13 AM   #2
toynbee
Member
 
Registered: Jan 2007
Location: Maryland
Distribution: Arch and Red Hat
Posts: 34

Rep: Reputation: 17
This may seem a minor point, but the samba shares in my fstab file all have linux-style slashes, IE:

//exchange/import /mnt/import

I'm not sure if that will fix it, but it's worth an attempt, perhaps.

Additionally, for security reasons, you should use the "credentials" function. Namely, create a file called "/root/smbcreds" or whatever and put the following into it:

username=Samba
password=PASS

then, in fstab, take out the "username" and "password" values and just add "credentials=/root/smbcreds" .... this way only your user and the system will be able to see the credentials.
 
Old 05-01-2008, 01:48 PM   #3
lefty.crupps
Member
 
Registered: Apr 2005
Location: Minneap USA
Distribution: Debian, Mepis, Sidux
Posts: 470

Original Poster
Rep: Reputation: 32
I've moved to the credentials-style authentication and also changed the Windows password to use standard alphanumeric characters; I've also tried mounting the dir with // and \\\\ but neither work yet... no resolution in site...
 
  


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
Why are all my fstab mounts not mounting on boot? lhughes08 Linux - Newbie 1 04-07-2008 10:26 AM
samba mounts in fstab Zurvan Linux - Networking 5 04-17-2005 10:13 AM
regular user mounts and fstab (again) clawder Slackware 7 12-31-2004 12:37 PM
How to edit mounts - fstab problems... muzicman82 Linux - General 3 01-29-2004 10:06 PM
switching mounts in fstab elpresidente Linux - General 6 07-09-2002 07:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:31 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration