Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-18-2006, 04:42 PM   #1
Registered: Feb 2004
Location: England
Distribution: Mandriva, Ubuntu, SME server + others
Posts: 41

Rep: Reputation: 16
Mounting CIFS as normal user

I currently use a script to mount a set of SMB shares as a regular (non-root) user, by setting smbmnt and smbumount SUID root (I initially learnt this trick from LinNeighborhood ). The script prompts me for the password and then uses it to mount the shares.

However, I've been reading that CIFS is replacing smbfs and I ought to use that. Can someone tell me how I can use CIFS as a normal user?

Andy B
Old 05-18-2006, 05:39 PM   #2
Senior Member
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 49
This is how I mount CIFS as non-root user: I make the "/sbin/mount.cifs" and "/sbin/umount.cifs" programs setuid root. And then in my /etc/fstab I gave the "user" or "users" option in mount options (I'm not sure what the difference is between those two) and then I changed ownership of the mountpoints to my user. Then I just do "mount <whatever>" from my user and it works.
Old 05-18-2006, 05:58 PM   #3
Registered: Feb 2004
Location: England
Distribution: Mandriva, Ubuntu, SME server + others
Posts: 41

Original Poster
Rep: Reputation: 16
Oh yes - setting mount.cifs and umount.cifs setuid root might do it - should have thought of that. Anyone know if there are any security issues with this? I recall that with smbfs, smbmount calls smbmnt, and there's some warning about _not_ setting smbmount setuid root, but it's OK with smbmnt. Is there anything similar with mount.cifs?

In the middle of something else right now, but I'll give this a go at some point and report back.



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 someone clarify somthing for me with mounting floppy through normal user nixerwannab Linux - Laptop and Netbook 4 01-24-2005 04:05 PM
mounting problems as normal user wisdom Linux - Networking 1 01-19-2005 11:26 AM
Mounting a network drive so a normal user can rwx it J.Q. Monkey Linux - Newbie 4 02-20-2004 08:17 AM
Mounting pendrive as a normal user (non-root) hbarbosa Linux - Hardware 1 11-03-2003 03:20 PM
Mounting ISO files as a normal user... Thymox Linux - General 3 02-16-2002 11:32 PM

All times are GMT -5. The time now is 04:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration