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; --> Hi, How can I mount a windows share as a specific user. Works great as root, but I don't ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 04:26 PM
Beauford
 
Posts: n/a
Default Mounting Windows Shares

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 04:26 PM
quip
 
Posts: n/a
Default Re: Mounting Windows Shares

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

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

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.


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

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


Hi,

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

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

On Thu, 18 Nov 2004 01:03:06 -0500, Beauford wrote:
> To clear things up though, I'm not mounting a partition on this machine.
> It is on another Window 2000 machine I have.


Then you need samba. Start samba (/etc/rc.d/rc.samba start) and the
processes nmbd and smbd should be running in daemon mode. Then fire up a
browser and point it to http://localhost:901. From there it's pretty
self-explanatory. You can set up samba to share only by user/pass. Don't
forget to run smbpasswd to add users to the samba user list (they should
also exist on the windows machines) even if they are already normal users
on you linux box.

Also, don't forget to set things up on the windows box properly

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

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.

To the OP:
Your gopher error could be the result of some broken syntax in
your /etc/fstab file. Adding an entry to /etc/fstab for your remote share,
specifying "smbfs" and adding the "users" option, will allow anyone to
mount/unmount it.

You will also need the uid, gid, and umask options specified, if you want
everyone to have access to the files after they are mounted.

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

On Thu, 18 Nov 2004 08:29:18 +0200, Giannis Vrentzos <gvre@gvre.gr>
wrote:

>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

>
>Hi,
>
>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.

Not sure about the umask option.

>
>Gvre


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

On Thu, 18 Nov 2004 06:58:07 -0600, quip <wnjjunk@cox.net> wrote:

>On Thu, 18 Nov 2004 01:03:06 -0500, Beauford wrote:
>> To clear things up though, I'm not mounting a partition on this machine.
>> It is on another Window 2000 machine I have.

>
>Then you need samba. Start samba (/etc/rc.d/rc.samba start) and the
>processes nmbd and smbd should be running in daemon mode. Then fire up a
>browser and point it to http://localhost:901. From there it's pretty
>self-explanatory. You can set up samba to share only by user/pass. Don't
>forget to run smbpasswd to add users to the samba user list (they should
>also exist on the windows machines) even if they are already normal users
>on you linux box.
>
>Also, don't forget to set things up on the windows box properly


I have Samba set up, but from my understanding what you describe is if
I want to connect to Linux from Windows - correct me if I'm wrong.
Also, I have never been able to get http://localhost:901 to work. In
years of trying.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-19-2008, 04:29 PM
chuck44
 
Posts: n/a
Default Re: Mounting Windows Shares

On Thu, 18 Nov 2004 11:19:59 -0500, Beauford wrote:

> I have Samba set up, but from my understanding what you describe is if
> I want to connect to Linux from Windows - correct me if I'm wrong.
> Also, I have never been able to get http://localhost:901 to work. In
> years of trying.


localhost:901 is used to connect to swat (a web front end to administer
samba). it has its own package needs to be installed.

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

>> I have Samba set up, but from my understanding what you describe is if
>> I want to connect to Linux from Windows - correct me if I'm wrong.
>> Also, I have never been able to get http://localhost:901 to work. In
>> years of trying.

>
> localhost:901 is used to connect to swat (a web front end to administer
> samba). it has its own package needs to be installed.


SWAT has been included in Slackware samba packages since I know about it.
You just need to enable it in /etc/inetd.conf ... (or in my case I start it
from xinetd).

Anyway that's not what original poster needed.

--
damjan
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 02:39 AM.


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