[olug] smbmount and fstab

David Walker linux_user at grax.com
Wed Jan 8 00:54:28 UTC 2003


You could use setuid but sudo is actually more limiting (read less risky).  
With setuid you have no control over the command line options they specify 
where you do with sudo.  Plus with sudo you can give out permissions on a per 
user or per group basis.

I think if you call a setuid program and it calls another program that it 
would do it with root (or whichever user it is setuid as) permissions. (Feel 
free to correct me if this is not correct)


On Tuesday 07 January 2003 06:50 pm, Brian Wiese wrote:
> i haven't tried it yet.. but i'm working with samba currently also.  i
> believe that the process of mounting a drive/fs and such is a priviledged
> operation, and so only root can do it.  i believe you can set one of the
> programs (smbmount?) as setuid root and then users can mount, with root
> priviledges... short of giving them sudo rights.
>
> # chmod +s /usr/bin/smbmount
>
> But you'd be using "mount" instead no?  I wonder if that has to be setuid
> as well?
>
> I've done some basic samba stuff before, but its been awhile (6-9 months?
> heck) and I think I've forgotten most things and don't have my network
> setup as i did... so I'm tryn to catch up a lot on this SMB/CIFS stuff.
>
> Eric, have you any experience with a Samba PDC before? or anyone else?
> How well does a linux samba domain controller work with an nt4 one?
> I think I've read that nt4 will not work as a BDC to a samba PDC, but that
> a samba BDC will work with a nt4 PDC... is this correct?
>
> Any pointers or tips would be appreciated... migrating nt4 pdc to a samba
> one.
>
> peace
> Brian
>
> On Tue, 07 Jan 2003 10:49:33 -0600
>
> Andrew Holm-Hansen <olug at einer.org> wrote:
> |I vaguely remember reading about a similar problem.  Won't smbmount (by
> |default)  only run for uid=root?  Another thing to check is your
> |smb.conf ... You can explicitely state which users have 'root'
> |privelages on the share with the
> |
> |admin users = user1, user2, user3
> |
> |directive.
> |
> |I think I solved this problem and forgot the solution because mine just
> |works... ;(  Sorry.
> |
> |Andrew
> |
> |Eric Penne wrote:
> |>I've partly figured out how to mount it as root and give the user
> |>permissions to write.
> |>
> |>smbmount //nt_le/ericp$ /directory -o credentials=file,uid=epenne
> |>
> |>I added the uid=epenne before but there was a space instead of a comma
> |>and smbmount just ignored the uid flag.
> |>
> |>I still am not allowed to mount the drive without having root
> |>privileges.  Can anybody help?
> |>
> |>Eric
> |>
> |>--- Eric Penne <epenne at yahoo.com> wrote:
> |>>I'm having troubles mounting a device on an NT4 server and allowing
> |>>the
> |>>user (not root) to modify the filesystem.
> |>>
> |>>I want the user to be able to mount the filesystem when they login.
> |>>I have to send a username and password to the NT server.
> |>>I want the user to be able to modify and create files on the mount.
> |>>
> |>>I've added:
> |>>
> |>>//nt_le/ericp$ /home/epenne/fileserver/ericp smbfs
> |>>defaults,noauto,user,owner 0 0
> |>>
> |>>to the /etc/fstab
> |>>
> |>>when I try to mount it asks for a password which it takes the
> |>>username
> |>>from my login of epenne when I want it to login as ericp.
> |>>
> |>>where can I pass the credentials file to the mount command?
> |>>
> |>>
> |>>I've manually mounted this drive from root using the credentials
> |>>file.
> |>>The permissions on the drive were for root and user ericp couldn't
> |>>write anything to the directories on the mounted drive.
> |>>
> |>>What options do I have to pass the username and password to smbmount
> |>>through /etc/fstab?
> |>>
> |>>Eric
>
>   Brian Wiese | bwiese at cotse.com | aim: unolinuxguru
> ------------------------------------------------------
>   GnuPG/PGP key 0x1E820A73 | "FREEDOM!" - Braveheart
> ------------------------------------------------------
> This is not about Napster or DVDs. It's about your Freedom.
>   I'll see your DMCA and raise you a First Amendment.
>               http://www.anti-dmca.org
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug




More information about the OLUG mailing list