Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-03-2004, 01:21 PM   #1
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)


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, 03:32 PM   #2
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, 05:24 PM   #3
Registered: Sep 2003
Posts: 175

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


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

Original Poster
Rep: Reputation: 30

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?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

All times are GMT -5. The time now is 10:06 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration