LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-31-2012, 01:28 PM   #1
pwjohnston
LQ Newbie
 
Registered: Jul 2009
Distribution: Fedora/CentOS
Posts: 20

Rep: Reputation: 1
CIFS/SMB mounting error.


Can someone please look this over? I think I need a second set of eyes here.

So I have a cifs share on this small network that I need to mount on this desktop. It mounted fine under Fedora 14, but after the upgrade to Fedora 16 it is not working.

The share is on //192.168.1.50/data

Now on the F16 box I have created a mount:

Code:
[root@f16d ~]$ ls -la /
drwxrwxrwx.   2 root root   8192 Mar 20 21:26 nasdata
I have set the credentials in:

Code:
[root@f16d ~]# ls -la /root/.smbcredentials
-rwx------. 1 root root 182 Feb 12 11:12 /root/.smbcredentials
[root@f16d ~]# cat /root/.smbcredentials
username=administrator@thecompany.local
password=<password>

The last line of my fstab has the entry:

Code:
[root@f16d ~]# ls -la /etc/fstab
-rw-r--r--. 1 root root 892 Mar 31 13:23 /etc/fstab

[root@f16d ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Sun Jan  1 22:03:39 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vol1-os     /                       ext4    defaults        1 1

/dev/mapper/vol1-data   /data                   ext4    defaults        1 1


UUID=2ebfe9c5-7fd7-4134-adfa-9d9ceeb88c18 /boot                   ext4   
defaults        1 2
UUID=770479df-ba31-4e11-8be1-ac8760676763 swap                    swap   
defaults        0 0




//192.168.1.50/data    /nasdata        cifs   
credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0
0
Now if I try to access the volume in Dolphin I get:

An error occurred with accessing "data on //192.168.1.50'. the system responded:
mount: only root can mount //192.168.1.50/data on /nasdata

However if I do a:
Code:
[langenoir@f16d ~]$ sudo mount -a
It mounts fine.

Prior to the upgrade we had a desktop and a laptop both running Fedora 14 and neither had a problem accessing this share. Now I have copied all the setting from the f14l laptop, but it's not working. Booting to the laptop the share mounts fine, no additional commands needed.

Here is the relevant configs of the two systems.

f14l Old Laptop
Code:
[root@f14l ~]# ls -la /
drwxrwxrwx    1 root root  8192 Mar 20 21:26 nasdata

[root@f14l ~]# ls -la /root/.smbcredentials
-rwx------. 1 root root 59 Mar  6  2011 /root/.smbcredentials

[root@f14l ~]# cat /root/.smbcredentials
username=administrator@thecompany.local
password=<password>

[root@f14l ~]# ls -la /etc/fstab
-rw-r--r--. 1 root root 961 May  2  2011 /etc/fstab
-
[root@f14l ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Feb  3 22:10:17 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#

UUID=8ff3e06c-5fa8-4fa9-9cdb-23866379bc13 /boot ext4    defaults        1 2

/dev/mapper/f14lvg-osvol /                      ext4    defaults        1 1

/dev/mapper/f14lvg-swap swap                    swap    defaults        0 0

/dev/mapper/f14lvg-data /data                   ext4    defaults        1 1

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



//192.168.1.50/data    /nas        cifs   
credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0
0

f16d New Desktop

Code:
[root@f16d ~]$ ls -la /
drwxrwxrwx.   2 root root   8192 Mar 20 21:26 nasdata

[root@f16d ~]# ls -la /root/.smbcredentials
-rwx------. 1 root root 182 Feb 12 11:12 /root/.smbcredentials

[root@f16d ~]# cat /root/.smbcredentials
username=administrator@thecompany.local
password=<password>

[root@f16d ~]# ls -la /etc/fstab
-rw-r--r--. 1 root root 892 Mar 31 13:23 /etc/fstab

[root@f16d ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Sun Jan  1 22:03:39 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vol1-os     /                       ext4    defaults        1 1

/dev/mapper/vol1-data   /data                   ext4    defaults        1 1


UUID=2ebfe9c5-7fd7-4134-adfa-9d9ceeb88c18 /boot                   ext4   
defaults        1 2
UUID=770479df-ba31-4e11-8be1-ac8760676763 swap                    swap   
defaults        0 0


//192.168.1.50/data    /nasdata        cifs   
credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0
0


Am I missing something here?
 
Old 04-01-2012, 07:41 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
From "man mount":
"Normally, only the superuser can mount filesystems. However, when fstab contains the user option on a line, anybody can mount the corresponding system."
So simply add "user" among the options in /etc/fstab and you should be able to mount it as user.
Why is it not needed in FC14 - now there's a question I'd like to get answered!
 
Old 05-05-2012, 12:52 PM   #3
pwjohnston
LQ Newbie
 
Registered: Jul 2009
Distribution: Fedora/CentOS
Posts: 20

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by pingu View Post
From "man mount":
"Normally, only the superuser can mount filesystems. However, when fstab contains the user option on a line, anybody can mount the corresponding system."
So simply add "user" among the options in /etc/fstab and you should be able to mount it as user.
Why is it not needed in FC14 - now there's a question I'd like to get answered!
This is still not working. I have tried editing /etc/fstab as root with:

Code:
//192.168.1.50/data  /nasdata   cifs   credentials=/root/.smbcredentials,iocharset=utf8,user,file_mode=0777,dir_mode=0777 0 0
Adding a uid for my user.

Code:
//192.168.1.50/data  /nasdata   cifs   credentials=/root/.smbcredentials,iocharset=utf8,user,uid=1000,file_mode=0777,dir_mode=0777 0 0
Adding a gid for the group I'm in.

Code:
//192.168.1.50/data  /nasdata   cifs   credentials=/root/.smbcredentials,iocharset=utf8,user,uid=1000,gid=1000,file_mode=0777,dir_mode=0777 0 0
I even took into consideration that there might be an issue with the credentials file and tried this:

Code:
//192.168.1.50/data    /nasdata       cifs   username=administrator@thecompany.local,password=<password>,user,uid=1000,gid=1000,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
So what am I missing?
 
Old 05-05-2012, 06:09 PM   #4
sys64738
Member
 
Registered: May 2008
Location: NRW/Germany
Posts: 105

Rep: Reputation: 30
Hi

did you check /var/log/messages for errors?
Or do receive any other error messages after trying to mount the share?
 
  


Reply

Tags
fstab, mountcifs, smbmount



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
Help with mounting samba share: smbmount or mount.cifs error: permission denied wdli Linux - Server 1 08-11-2009 11:31 PM
SMB/Samba not working with CIFS. posix_memalign Linux - Software 3 01-14-2009 01:29 PM
Mounting windows share via cifs (fstab entry) - error 13 opening credentials file O(V)eGA_l2el) Linux - Networking 2 12-05-2006 11:22 AM
mounting SMB/CIFS shares from FreeBSD scott2004 *BSD 2 10-21-2006 12:09 PM
Error Mounting Windows SMB Share plustiber Linux - Networking 1 06-27-2005 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:26 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
Open Source Consulting | Domain Registration