Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Samba share in /etc/fstab is troubling a noob.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
TobiWan
Apprentice
Apprentice


Joined: 07 Jul 2003
Posts: 275
Location: Brussels, Old Europe

PostPosted: Mon Dec 22, 2003 9:05 pm    Post subject: Samba share in /etc/fstab is troubling a noob. Reply with quote

Hi there,

I am not familiar with /etc/fstab entries concerning Samba entries. Is it possible and if yes, what does such an entry look like when I want to have the following:

I want to create a link on my KDE desktop with a nice harddrive icon that uses this entry from fstab. I want every normal user to be able to mount or umount the thing like a CD or DVD. Is this possible?

The share is a normal Windows 98 share (share level security) and has a password (no user attached).

thanks for a little pointer,
Tobias
_________________
Killing for peace is like fucking for virginity.
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Mon Dec 22, 2003 9:25 pm    Post subject: Reply with quote

In my fstab there's an entry like this which can be mounted by users
Code:
//smbserver/smbfolder   /mnt/smbfolder    smbfs    guest,ro,noauto,user,gid=users,umask=0002

The samba user used to login remotely is 'Guest' however, and the share is mounted read-only. Hope that helps.
Back to top
View user's profile Send private message
TobiWan
Apprentice
Apprentice


Joined: 07 Jul 2003
Posts: 275
Location: Brussels, Old Europe

PostPosted: Mon Dec 22, 2003 9:54 pm    Post subject: Reply with quote

Code:
\\bespin\pocketboy  /mnt/pocketboy  smbfs  user,password=xyz,uid=1000,noauto  0  0


This works great for me. Thanks :-)

Though I cannot add another device link icon to my KDE desktop. KDE doesn't seem to accept the fstab entry when it isn't associated with a /dev entry.

Isn't there a possibility or a way to add a mountable icon just like a CD drive on the KDE desktop for Samba shares?

regards,
Tobias
_________________
Killing for peace is like fucking for virginity.
Back to top
View user's profile Send private message
mvbv-linux
n00b
n00b


Joined: 15 Dec 2003
Posts: 50
Location: Belgium

PostPosted: Wed Jan 28, 2004 6:22 pm    Post subject: Reply with quote

Hi,

I want to automatically mount a win xp share protected with a password...
Where should I specify the password...I guess in /etc/fstab..but I don't want normal users to see it and they do have read access to /etc/fstab.
How can I achive this ?
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Wed Jan 28, 2004 6:33 pm    Post subject: Reply with quote

Create a text file that looks like this
Code:
username = <username>
password = <password>

and place it to a protected directory (let's say the file is '/root/smbcred'). Now add to your mount options
Code:
credentials=/root/smbcred

For more info on mounting a smb share, type
Code:
man smbmount

Bye!
Back to top
View user's profile Send private message
mvbv-linux
n00b
n00b


Joined: 15 Dec 2003
Posts: 50
Location: Belgium

PostPosted: Wed Jan 28, 2004 6:48 pm    Post subject: Reply with quote

Thanks...I had a look into the man smbmount, and indeed, it is explained very clearly :oops:
Back to top
View user's profile Send private message
Grik
Tux's lil' helper
Tux's lil' helper


Joined: 30 Sep 2004
Posts: 88
Location: Netherlands

PostPosted: Sun Nov 28, 2004 1:11 pm    Post subject: Reply with quote

I am not able to mount my samba shares with the /etc/fstab file.
For example, I can mount a share like this:
Code:
mount -t smbfs -o username=rik //10.0.0.8/Riksdir /home/rik/smb
Password:

Now I can browse my samba share like it is a directory on my PC.
But I don't want to type this mount command every time, I want to place it in my /etc/fstab. I tried several different lines, but they all don't work! Examples:
Code:
//10.0.0.8/Riksdir      /home/rik/smb   smbfs   noauto,user,uid=1000,gid=100,credentials=/home/smb_rik  0 0
Code:
//10.0.0.8/Riksdir      /home/rik/smb   smbfs   uid=1000,gid=100,credentials=/root/smb_rik      0 0

/root/smb_rik contains:
Code:
username = rik
password = mypassword

And has read rights 400 for root:root (I tried other files on other locations with other permissions, like 777).

...Help?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum