LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 10-19-2014, 04:40 PM   #1
pr0xibus
Member
 
Registered: Apr 2004
Location: Scotland
Distribution: Slackware
Posts: 215

Rep: Reputation: 44
Auto mounting smb fstab


Evening guys

I have a share on a windows server under //192.168.1.1/Backup this is mounted to /mnt/Windows

My fstab looks like

Code:
dev/sda1        swap             swap        defaults         0   0
/dev/sda2        /                ext4        defaults         1   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
//192.168.1.1/Backup /mnt/Windows cifs credentials=/etc/creds-home,uid=1000,gid=100 0 0
now if i log in as root it mounts just fine with read/write but when logging in as my normal account it wont mount. on dolphin the error is "An error occurred while accessing backup, the system responsed mount: only root can mount 192.168.1.1/Backup on /mnt/Windows"

any help would be appreciated
 
Old 10-19-2014, 06:03 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
I'd add the user option to the fourth field:
Code:
//192.168.1.1/Backup /mnt/Windows cifs credentials=/etc/creds-home,uid=1000,gid=100,user 0 0
 
Old 10-20-2014, 12:29 AM   #3
pr0xibus
Member
 
Registered: Apr 2004
Location: Scotland
Distribution: Slackware
Posts: 215

Original Poster
Rep: Reputation: 44
Hello

Thanks for the reply, the error i now receive in dolphin is
"An errror occured: The program is not installed setuid root - "user" CIFS mounts not supported

dmesg gave me

Code:
[   15.833826] FS-Cache: Loaded
[   15.844674] FS-Cache: Netfs 'cifs' registered for caching
[   15.848782] CIFS VFS: Error connecting to socket. Aborting operation.
[   15.848846] CIFS VFS: cifs_mount failed w/return code = -101
[   15.918856] CIFS VFS: Error connecting to socket. Aborting operation.
[   15.918910] CIFS VFS: cifs_mount failed w/return code = -101

Last edited by pr0xibus; 10-20-2014 at 12:30 AM.
 
Old 10-20-2014, 08:09 AM   #4
lukameen
Member
 
Registered: May 2004
Distribution: Slackware
Posts: 69

Rep: Reputation: 31
I have several windows servers and shares I automount and have no problems accessing, writing to, etc. I'm also the only user on my slackware box at work. I created a .smbcredentials file that works well for me. Try creating a .smbcredentials file and set up your fstab like the below example.

//192.168.1.1/backup /mnt/windows cifs credentials=/etc/creds-home/.smbcredentials,file_mode=0777,dir_mode=0777 0 0
 
Old 10-20-2014, 01:49 PM   #5
pr0xibus
Member
 
Registered: Apr 2004
Location: Scotland
Distribution: Slackware
Posts: 215

Original Poster
Rep: Reputation: 44
Hello

Thanks for the reply,

Its currently what i have /etc/creds-home is the credential file i tried what you had suggested but its the same error "only root can mount 192.168.1.1/Backup on /mnt/Windows" For just now i have resorted to mount -t cifs //**** via konsole which works fine
 
Old 10-20-2014, 01:58 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Do you have /mnt/Windows as 777? If the user doesn't have access to the directory, it may prevent the mounting. I can't check my system since I got rid of cifs mounts years ago for NFS mounts.
 
Old 10-21-2014, 07:30 AM   #7
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
Maybe you could mount it trhough /etc/rc.d/rc.local ?
I often do this for somewhat 'special' occasions ... eg
Code:
df -a | grep -wq '/mnt/Windows$' || {
  mount -t cifs -o credentials=.... //192.168.1.1/Backup /mnt/Windows && \
  echo ":: mounted windows share"
}
 
  


Reply



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
Mounting RW (read write) SMB (Samba) shares via FSTAB - Ubuntu 10.10 bcyork Linux - Networking 2 12-09-2010 02:43 PM
Auto-mounting ntfs partition in fstab Mithrilhall Linux - Newbie 3 09-22-2009 01:03 AM
permanently mounting a SMB folder on fstab ceantuco Linux - Newbie 2 04-20-2009 09:35 AM
Auto mounting Linux smb share on Windows at startup neranjana Linux - Networking 1 07-02-2004 06:56 PM
SMB mounting with /etc/fstab greenhornet Linux - Networking 2 01-15-2003 03:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

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