Re: mounting windows shares as user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All of that works fine. I do it all manually with a command line like
what you suggested. The problem is I have to log in as root to do it. On
debian, I can run smbmount (which mount calls when you use -t smbfs)
without logging in as root. On redhat, I can't. But I've figured it out. When you run smbmount without being root, it says you need to install it SUID. So I did a chmod u+s on smbmnt, smbmount, and smbumount. Then it said smbmount must not be installed SUID. I looked at those binaries on my debian box, and only smbmnt and smbumount are SUID. So I removed the SUID bit on smbmount, and now I can mount windows shares without logging in as root first.


I still have problems with the /etc/fstab entries I listed in my original email, in that I'm not allowed to mount devices to /mnt without being root, even though I have the 'user' option specified. How does Nautilus determine which mounted devices get desktop links created automagically? It seems that being in /etc/fstab is the key.

Phillip Rose wrote:
Sorry, I'll take one mo' stab at it. If you don't want the share to mount
automatically you could add the "noauto" option to what I suggested
previously, or else have a script or alias with a command similar the one
below. Maybe a script is better than an alias, because you could hide it
better. You should have the same username on both machines. This works for
me using my name as a regular non-priveleged user on Linux and as a
priveleged user on Win2K. No matter what you do, you'll need the password
"pre-entered", otherwise you'll be prompted for it. At least that's my
experiece. Note that the mount option is "smbfs", not "smb".

mount -t smbfs -o username=yrs_truly,password=secret
//windoze_machine/windoze_share /mnt/win_g

--Phillip

At 02:21 07/09/03 -0500, Justin Georgeson wrote:

That automounts the share at boot time, right? I'm trying to be able to mount shares manually when logged in as a non-privileged user.

Phillip Rose wrote:

Here's how I do it on RH 9. I'm curious to see other solutions. This is the
pertinent line from my /etc/fstab:
//windoze_machine/windoze_share	/mnt/win_g	smbfs
username=yrs_truly,password=secret 0 0

This involves putting my user passwd in clear text in my fstab, so I limit
even read access to this file to root. You can use uid or gid instead of
uname, of course. I would only do this at home, btw, and then only behind a
firewall (I use Smoothwall).

--Phillip Rose




-- ; Justin Georgeson ; http://www.lopht.net ; mailto:jgeorgeson@xxxxxxxxx ; "Free the mallocs, delete the news"



--
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux