Unix Technical Forum

Mounting Windows Shares

This is a discussion on Mounting Windows Shares within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> >>> How can I mount a windows share as a specific user. Works great as >>> root, but I ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 02-19-2008, 05:29 PM
Damjan
 
Posts: n/a
Default Re: Mounting Windows Shares

>>> How can I mount a windows share as a specific user. Works great as
>>> root, but I don't want to have to su to root everytime I want to mount
>>> a share. I want user X to be able to do it.
>>>
>>> Also. I get this error when I mount a Windows share. It still works,
>>> but the message is just annoying.


>>Search mount man page for user, uid, gid, umask options.

>
> Here is the line I use:
>
> mount -t smbfs -o username=user,password=pass,uid=1000,gid=100
> //winshare /home/user/mountpoint
>
> Works fine as root, but if I try to run this as a user. It says I have
> to be root.


Yes, normal users can't mount anything unless the superuser allows them.

One way to allow them is to add the mountpoint in /etc/fstab

//winshare /home/user/mountpoint smbfs \
user,noauto,username=user,password=pass 0 0

Other way is to setuid root the /usr/bin/smbmnt program... well read the man
page


* setuid root means:
chmod u+s /usr/bin/smbmnt
chown root /usr/bin/smbmnt

--
damjan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 02-19-2008, 05:30 PM
quip
 
Posts: n/a
Default Re: Mounting Windows Shares

On Thu, 18 Nov 2004 08:05:23 -0800, Jeffrey Froman wrote:

> quip wrote:
>
>> Then you need samba

>
> I think what the OP is saying is that a remote share from a Windows machine
> is being mounted onto a Linux filesystem, not the other way around. For
> such a task, there is no need to run Samba at all, just the mount the share
> as an smbfs filesystem.


Absolutley correct; my bad. I guess the caffeine hadn't made its way to
my brain when I posted...yeah, that's the ticket...;P

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 02-19-2008, 05:31 PM
GLK9MM
 
Posts: n/a
Default Re: Mounting Windows Shares

Beauford wrote:
> On Wed, 17 Nov 2004 18:54:48 -0600, quip <wnjjunk@cox.net> wrote:
>
>
>>On Wed, 17 Nov 2004 19:14:07 -0500, Beauford wrote:
>>
>>
>>>Hi,
>>>
>>>How can I mount a windows share as a specific user. Works great as
>>>root, but I don't want to have to su to root everytime I want to mount
>>>a share. I want user X to be able to do it.
>>>
>>>Also. I get this error when I mount a Windows share. It still works,
>>>but the message is just annoying.
>>>
>>>"Ignoring badly formed line in configuration file: gopher"
>>>
>>>
>>>Thanks

>>
>>I don't know why you are getting the specific error; are you trying to
>>mount to a directory named gopher?
>>
>>Anyway, you should be able to add the option "users" to allow anyone to
>>mount the share. You could then add the option "umask=# # #" to restrict
>>privelages as desired. Both of these options go in the last column of you
>>/etc/fstab file.
>>
>>This all assumes you are referencing a partition on your hd.
>>
>>--quip

>
>
> I have no idea what gopher is, certainly not a mount point. To clear
> things up though, I'm not mounting a partition on this machine. It is
> on another Window 2000 machine I have.
>
>


Ahhh grife......all you youngins. Don't know what gopher is?

That statement makes me want to sob uncontrollably. Next thing you
know, someone is going to say, what's a punch card? what's a terminal
printer? what's archie? veronica? jughead?

Tsk.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 02-19-2008, 05:31 PM
notbob
 
Posts: n/a
Default Re: Mounting Windows Shares

On 2004-11-19, GLK9MM <spam-fodder02@cox.REMOVE.net> wrote:

>
> Ahhh grife......all you youngins. Don't know what gopher is?
>
> That statement makes me want to sob uncontrollably. Next thing you
> know, someone is going to say, what's a punch card? what's a terminal
> printer? what's archie? veronica? jughead?


Now, now.... Don't cry. Educate.

<http://searchwebservices.techtarget....212203,00.html



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 02-19-2008, 05:32 PM
The Real Bev
 
Posts: n/a
Default Re: Mounting Windows Shares

GLK9MM wrote:
>
> Beauford wrote:
> > I have no idea what gopher is, certainly not a mount point. To clear
> > things up though, I'm not mounting a partition on this machine. It is
> > on another Window 2000 machine I have.

>
> Ahhh grife......all you youngins. Don't know what gopher is?
>
> That statement makes me want to sob uncontrollably. Next thing you
> know, someone is going to say, what's a punch card? what's a terminal
> printer? what's archie? veronica? jughead?


Dry your tears, some of us remember drum cards and those finger-thingies
that transformed a Selectric into a printer. 40-column 9" b+w
monitors. 8" floppies. 5-meg hard drives. Wordstar. Supercalc.

ASSEMBLY LANGUAGE! (Not me, but I know those who do.)

--
Cheers,
Bev
<><><><><><><><><><><><><><><><><><><><><><><><><> <><><><>
"I've seen a look in dogs' eyes, a quickly vanishing look
of amazed contempt, and I am convinced that basically dogs
think humans are nuts." -- John Steinbeck
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:23 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com