Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mount smb share as non-root user

12 views
Skip to first unread message

craigbeanhead

unread,
Jul 9, 2003, 1:58:21 PM7/9/03
to
Hi,

I'm running Mandrake 9.0, and when I'm logged in as root I can access
a samba share with the following fstab entry:

//wallace/web /mnt/web smbfs
fmask=0777,dmask=0777,user,username=root,password= 0 0

The /bin/mount command has read/write access to my particular user,
and the /usr/bin/smbmount does too. I can't get "mount /mnt/web" to
work as any user but root! Where am I going wrong?

Craig

Jacob Westenbach

unread,
Jul 9, 2003, 1:59:26 PM7/9/03
to
"craigbeanhead" <craigb...@hotmail.com> wrote in message
news:18887d7.03070...@posting.google.com...

Try removing "username-root" from the fstab entry.

JW


craigbeanhead

unread,
Jul 9, 2003, 5:20:25 PM7/9/03
to
> Try removing "username-root" from the fstab entry.
>
> JW

Thanks for your tip! I think I've just sorted the problem myself, I've
adjusted the owner of the problem directories from 'root' to 'craig'.
I also removed some of the extra options from fstab too - it now looks
like this:

//wallace/web /mnt/web smbfs user,defaults,password= 0 0
//wallace/shared /mnt/shared smbfs user,defaults,password= 0 0

Now - how do I go about making those samba shares locally available
(and mountable etc.) to all users on my client machine?

Craig

Esben Skov Pedersen

unread,
Jul 9, 2003, 6:08:29 PM7/9/03
to
craigbeanhead wrote:

add umask=000 will make it read/write for all users.

you have user in the options line, that should make sure that all users can
mount and unmount it.

/Esben

craigbeanhead

unread,
Jul 10, 2003, 2:35:57 AM7/10/03
to
Esben Skov Pedersen <sp...@geek.linux.dk> wrote:
> add umask=000 will make it read/write for all users.

The share is already read/write for 'root' and 'craig', regardless of
who mounted the share. I think this option is unnecessary in my setup.

> you have user in the options line, that should make sure that all users can
> mount and unmount it.

The problem is that it doesn't! I had to chown the local mount point
to craig, which is the non-root user. When craig owns it (/mnt/shared
that is), obviously root can mount/umount the drive, but I'm not sure
that other non-root users could. How do I make this share
mountable/umountable by everyone without mucking about with chown? Can
I make a group own a directory, then add everyone to the group?

> /Esben

Thanks
Craig

Finny Merrill

unread,
Jul 10, 2003, 8:37:15 AM7/10/03
to
craigb...@hotmail.com (craigbeanhead) wrote in message news:<18887d7.03070...@posting.google.com>...

>
> The problem is that it doesn't! I had to chown the local mount point
> to craig, which is the non-root user. When craig owns it (/mnt/shared
> that is), obviously root can mount/umount the drive, but I'm not sure
> that other non-root users could. How do I make this share
> mountable/umountable by everyone without mucking about with chown? Can
> I make a group own a directory, then add everyone to the group?
>
checked the permissions on the directory?

craigbeanhead

unread,
Jul 10, 2003, 1:06:40 PM7/10/03
to
gri...@t2n.org (Finny Merrill) wrote in message

> checked the permissions on the directory?

777!

Bill Marcum

unread,
Jul 10, 2003, 2:38:14 PM7/10/03
to
On 10 Jul 2003 05:37:15 -0700, Finny Merrill

man mount; man fstab
Use the "user" or "users" option to allow non-root users to mount a
drive. (with "users", any user can umount the drive; with "user" it
can only be umounted by the user who mounted it).


--
Here I am, fifty-eight, and I still don't know what I want to be when
I grow up.
-- Peter Drucker

Finny Merrill

unread,
Jul 10, 2003, 3:06:07 PM7/10/03
to
Bill Marcum <bma...@iglou.com> wrote in
news:mdo0u-...@don.localnet:
> man mount; man fstab
> Use the "user" or "users" option to allow non-root users to mount a
> drive. (with "users", any user can umount the drive; with "user" it
> can only be umounted by the user who mounted it).

the OP; the replies

He already has that.

0 new messages