LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Fedora 7 and using cifs in fstab? (https://www.linuxquestions.org/questions/linux-general-1/fedora-7-and-using-cifs-in-fstab-558915/)

powellbob424 06-03-2007 07:19 PM

Fedora 7 and using cifs in fstab?
 
Due to a dead harddrive, I'm rebuilding my linux machine a new drive and Fedora 7. Unfortunately, I cannot get my windows shared directories to mount correctly.

From FC5, my fstab had this line:
//192.168.0.101/n /mnt/p4/c smbfs credentials=/root/.smbpassword,dmask=777,fmask=777 0 0


After reading the various posts it seems that cifs has issues, but I finally set my fstab file with this line:

//192.168.0.101/n /mnt/p4/n cifs credentials=/root/.smbpassword,dir_mode=0777,file_mode=0777 0 0


Everything "looks" good (directory and file rights), but in reality I cannot write to any file.

In the many combinations I've tried (now lost count of) to access the shared drive, I usually end up with file rights of "rwxrwSrwt".

What am I doing wrong?

Thanks

Lenard 06-04-2007 07:04 AM

Try something like;

//192.168.0.101/n /mnt/p4/n cifs credentials=/root/.smbpassword,users,rw umask=008 0 0

powellbob424 06-04-2007 01:55 PM

Unfortunately, when I mount manually, the following error message is returned:

[mntent]: line 9 in /etc/fstab is bad

What could I be doing wrong?

michaelk 06-04-2007 02:26 PM

Syntax error.
Quote:

//192.168.0.101/n /mnt/p4/n cifs credentials=/root/.smbpassword,users,rw umask=008 0 0
Should be
.... credentials=/root/.smbpassword,users,rw,umask=008....

Lenard 06-04-2007 05:30 PM

Yep, thanks michaelk for catching my typo.

powellbob424 06-14-2007 09:57 PM

Sorry for the delay, I've been out of town for the last week.

I updated fstab for the typo, but still can't write to a file. Directories look fine, but all files are listed with file rights of "-rwxrwSrwt".

Just so there isn't any confusion, here is my fstab:

//192.168.0.101/n /mnt/p4/n cifs credentials=/root/.smbpassword,users,rw,umask=008 0 0

Any ideas what is wrong?

Thanks!!!

Lenard 06-14-2007 10:27 PM

Looks OK to me.........
Code:

//192.168.49.50/Laserfiche      /mnt/Desktop    cifs noauto,credentials=/home/lenard/bin/cifs.txt,users,rw,umask=008 0 0
Could be that you have not updated the samba packages.........

me i'm using the samba packages from samba.org rebuilt from the source using the Red Hat spec file found inside the extracted source.

http://us1.samba.org/samba/ftp/Binar....25a-1.src.rpm

powellbob424 06-15-2007 02:56 PM

Thanks for the message.

I double checked and I'm using samba version 3.0.25a-3.fc7 so I'm up to date.

I also tried adding the "noauto" to my fstab, but there was no change.

Any other ideas?

Lenard 06-15-2007 03:15 PM

No not really, does the share mount when done by hand???

mount-t cifs //192.168.0.101/n /mnt/p4/n credentials=/root/.smbpassword -rw

What does the smbpassword file look like, for example it should be something like(notice the spacing):

username = fred
password = letmein


The 'noauto' option is used because I do not need or want full time access to the share. i just posted mine as an example for comparison.

powellbob424 06-15-2007 06:36 PM

If I mount manually, nothing changes. I can see files, open them,but can't save anything. Yes, my credentials file looks correct.

I also tried connecting to a different XP machine where I shared the drive with the same results. Directories are wide open, but file show rights of "-rwxrwSrwt" and cannot write to any file or put a new file into a directory.

Not that it makes a difference, but the first machine (n drive in fstab) is a NTRS drive, while the second XP machine is using a fat32 drive. I've also tried turning selinux and firewalls off -- no change.

What else should I try (besides putting linux on the xp boxes).

Thanks

Lenard 06-16-2007 05:22 AM

This is expected and normal: file show rights of "-rwxrwSrwt"

Example: -rwxrwSrwt 1 root root 249K Mar 6 10:09 tzupdater-1_0_1.zip

Are you mounting as root and your normal user account does not have write access???
Try making the user part of the groups, using my groups as an example;
$ groups lenard
lenard : lenard root daemon sys adm disk wheel

powellbob424 06-16-2007 08:20 PM

OK, I've made some progress, but am still not there yet.

First, as suggested, I made sure that the group "users" (which already existed) contained both my usual username "bob" along with "root".

As bob, I can now edit/save a file and copy files into existing directories, but if I use gedit to edit a file it complains that it can't make the backup file.

As root, however, I still can't edit/save/copy files even though root owns all files. Directories are still show as wide open and file have "-rwxrwSrwt" for both bob and root.

Any more ideas?


All times are GMT -5. The time now is 08:13 AM.