LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-03-2004, 12:21 PM   #1
jeopardyracing
Member
 
Registered: Sep 2003
Posts: 175

Rep: Reputation: 30
Mount SMB Share from user account


Here's the scoop: I need to mount a samba share on my Macintosh from a user account in my Knoppix-powered Dell.

When I do, Knoppix seems to honor the group permissions found on the Mac, rather than the user permissions - meaning I can neither read nor wrote to certain directories unless I give those permissions to the group on the Mac itself - a lot of work since many directories don't have the group permissions I need.

I used to solve this problem in Red Hat by making an entry in FSTAB but here's the thing: when you boot into Knoppix it edits the FSTAB each time (even a HD install) and so my entries keep getting changed! I therefore have been using the following shell script to mount the shares, logged into a shell as root but using an ordinary user account in Knoppix (ie not logged into a root KDE session, etc)

#!/bin/bash

smbmount //Mac/share /mnt/mac -o username=rhoyer,uid=rhoyer,rw,dmask=777,fmask=777

If I use the identical scrpt, logged in as root (which of course I never usually do) I it appears that the permissions are fully opened - so the issue is not on the Mac side of things.

Is there any way to modify my syntax to give the correct permissions?
 
Old 12-03-2004, 02:32 PM   #2
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Normally, you set suid on the smbmount & smbumount binaries to allow normal users to mount samba shares.

chmod +s /usr/bin/smbmnt
chmod +s /usr/bin/smbumount

I'm not that familiar with Knoppix though, so I'm not sure how you'd go about making that stick after a reboot. I presume you could remaster the CD, if you're using a CD. Else place it in a script and run that script on bootup.
 
Old 12-03-2004, 04:24 PM   #3
jeopardyracing
Member
 
Registered: Sep 2003
Posts: 175

Original Poster
Rep: Reputation: 30
I'll give it a try!

[Removed].

Last edited by jeopardyracing; 12-03-2004 at 06:23 PM.
 
Old 12-03-2004, 05:04 PM   #4
jeopardyracing
Member
 
Registered: Sep 2003
Posts: 175

Original Poster
Rep: Reputation: 30
Update

I found a flaw in my syntax, and now I am actually able to modify FSTAB to retain the smb shares on reboot. However, I still have the same issue that I had before: even though I specify the username in the fstab entry, only resources with "other" permissions can be read or written on the Mac.

I strongly suspect the following is the reason: while the username is the same on both machines, my primary username = UID 1000 in Knoppix but UID 501 on the Mac! I think that when I am logged in as root in KNoppix this distinction doesn't matter, but when when I am in the user account, the Knoppix PC isn't concerned that the username is the same on the Mac's files, it looks at the numeric UID and bases its permissions on that, despite my having dmask=777 and fmask=777 in the fstab entry. Any ideas as to why my dmask and fmask aren't working?
 
  


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
can't mount a smb share over wireless... Savet Linux - Wireless Networking 10 05-02-2011 01:14 PM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
SMB: More then one Windows user/ smb account? 1veedo Linux - Networking 2 03-15-2005 04:16 PM
can't mount smb share as non-root user nixinbarrie Linux - Networking 5 09-27-2004 08:51 PM
Cannot mount SMB share hotblack Linux - Networking 7 08-07-2003 11:36 AM

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

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