LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-28-2004, 12:46 AM   #1
lcdial
LQ Newbie
 
Registered: Mar 2004
Location: Boston, MA
Distribution: Mandrake 10 Community
Posts: 15

Rep: Reputation: 0
SMBMount as user


Hello,

I've looked on this forum and found some advice, but it didn't seem to work for me. I'm trying to allow users to mount samba shares (winxp actually). Here's what I've done:

1) At first. it would not let me mount it at all. So I followed some advice on this forum and ran the following commands:
Code:
# chmod a+s `which smbmount`
# chmod a+xs /usr/bin/smbmnt
2) Then it gave me an error that libsmb can *NOT* be run suid root. So I looked for that, and I found that I should run the following:
Code:
# chmod 700 /usr/bin/smbmou
# chmod 700 /usr/bin/smbmount
# chmod 700 /usr/bin/smbumount
3) NOW, I can "mount" the shares as a user, but I get nothing, e.g.
Code:
$ mount /mnt/laptop
$ ls /mnt/laptop/
$ su
# mount /mnt/laptop
# ls /mnt/laptop
(directory listing)
Here's my fstab entry (userid and password omitted):
Code:
//laptop-xp/shared /mnt/laptop smb uid=XXXXXX,dmask=777,fmask=777,password=XXXXX,noauto,user,owner 0 0
Anyone ever encounter anything like this? Thanks in advance!!!
 
Old 04-28-2004, 01:01 AM   #2
ToeShot
Member
 
Registered: Nov 2001
Location: Near Chicago
Distribution: FC5, Solaris 10, WinXP
Posts: 152

Rep: Reputation: 30
I am not sure how the smb mount works i\with the fstab file. I have never tried it like that. What I would suggest is trying to mount it manully first like this:

mount -t smbfs -o username=administrator,password=******** //Captain/Share /captain

obviously your directories will be different but if you get this command working then you know there is a problem with the fstab file

HTH
 
Old 04-28-2004, 06:15 PM   #3
lcdial
LQ Newbie
 
Registered: Mar 2004
Location: Boston, MA
Distribution: Mandrake 10 Community
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for the suggestion. When I try the mount -t command, I get
"Only root can do that"

I want to be able to have my users mount and unmount the smb share. Surely this must be possible -- any other suggestions?

Thanks in advance!
 
Old 04-28-2004, 08:54 PM   #4
lcdial
LQ Newbie
 
Registered: Mar 2004
Location: Boston, MA
Distribution: Mandrake 10 Community
Posts: 15

Original Poster
Rep: Reputation: 0
Okay, I used the elephant to squash the ant and uninstalled and reinstalled samba. It now works semi-appropriately, but I have a bizarre permissions problem:

Users can mount samba shares within their user directories with smbmount, i.e.
Code:
$smbmount //computer/service /home/user/sambamount
BUT users cannot mount to /mnt! i.e.:
Code:
$smbmount //computer/service /mnt/sambamount
cannot mount on /mnt/sambamount: Operation not permitted
smbmnt failed: 1
Samba documentation states that this is a permission problem. So I changed the permissions to 777 on /mnt and /mnt/sambamount and I get the same thing. I think Samba is just out to get me!!!

If anyone has any ideas, I'd really appreciate them. This seems like it should be pretty simple. Thanks in advance!
 
Old 05-02-2004, 11:54 AM   #5
lcdial
LQ Newbie
 
Registered: Mar 2004
Location: Boston, MA
Distribution: Mandrake 10 Community
Posts: 15

Original Poster
Rep: Reputation: 0
Okay...

Well, I think I found the problem. According to the smbmnt man page,
Code:
A setuid smbmnt will only allow mounts on directories owned by the user, and that the user has write permission on.
So it looks like the user has to have write permissions on the directory and own it. Does anyone know if there is a way around this? Thanks!
 
Old 05-02-2004, 04:11 PM   #6
arete1969
LQ Newbie
 
Registered: Apr 2004
Distribution: Mandrake (9.0)
Posts: 7

Rep: Reputation: 0
I probably shouldn't say anything since I'm having problems of my own, but here's a way around mounting that I really like: smb://compname in the location bar of, say, Konqueror or whatever your file tool is. It works by hostname and ip, and if you have write access you can add/modify files just as if it were a regular, mounted share. It doesn't work on the command line, though. : (
 
Old 11-03-2004, 03:58 AM   #7
Hegemon
Member
 
Registered: Jan 2002
Location: Australia
Distribution: Gentoo
Posts: 103

Rep: Reputation: 15
You could try writing a simple script that mounts the drive and suiding that script to run as root. Suid is generally considered a security risk but it should be fine on home systems.
 
  


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
how can i run smbmount automatically when a user login rddreamz Linux - Networking 4 02-18-2006 03:10 AM
smbmount not mounting when logged on as a user hunan6 Slackware 1 02-05-2005 08:27 PM
How to use smbmount. Tiyogi Linux - Networking 2 04-14-2004 07:13 AM
RH7.3 and smbmount as normal user Sylhouette Linux - Software 3 02-24-2003 10:38 PM
smbmount ??? vwhk Linux - General 2 01-23-2002 08:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:48 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