Re: Cif mount

2020-04-27 Thread Brad Hinson
Hi Peter,

I'm not sure if you ever got this working, but I thought I'd add a couple
of thoughts just in case.  Your questions touched upon two different
topics, and they each have their own answers:

1.) Is there a way to permit access to more than one user for a CIF mount ?
As Aria mentioned, this can be accomplished by setting the UID/GID of the
mount point.  For example, you could mount the Windows share with a
specific group ID, then ensure each user you want to access the mount point
belongs to that shared group.  The important differentiator is that the
root user mounts the CIFS share once, then multiple users can access it.

As an alternative approach, you can use the credentials method that Aria
mentioned, or perform a multi-user mount.  For reference, here's how to set
that up:

Steps for RHEL:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/mounting_an_smb_share
(see section 9.2.4 "Authenticating to an SMB share using a credentials
file")
(see section 9.2.5 "Performing a multi-user SMB mount")

Steps for SLES:
https://www.suse.com/support/kb/doc/?id=16706

2) Is it possible to mount cif with multiple uid at once ? ... I mean
authority based mount where we specify UID while doing mount
This is something that the Gnome desktop does.  Using the Nautilus file
browser, you can connect to a Windows share, provide your user credentials
to access the share, and the mount point appears "automatically" on your
desktop.  You don't need Gnome to accomplish this, but instead you can use
the underlying component (fuse, which stands for "filesystem in userspace")
to do the same thing from the command line.  The end result is that each
user can mount the Windows share using their own credentials, and multiple
users can have it mounted simultaneously.

If you don't have a Gnome desktop installed, you'll need to install a few
required packages.  The following package names are based on RHEL, so may
need some tweaks for other Linux distributions, but it should be very
similar:
- gvfs-fuse: This provides the Fuse daemon for creating the mount point
"automatically"
- gvfs-smb: Allows mounting CIFS shares through Fuse
- dbus-x11: This provides a binary called "dbus-launch" that you'll need
before mounting the CIFS share

Once these are installed, you can use "gio" to mount the Windows share.
Here are the steps with comments:

### Install package dependencies
# yum install gvfs-fuse gvfs-smb dbus-x11

### Change to the user you'd like to mount, "myuser" for example
# su - myuser

### Create a dbus-enabled shell.  Otherwise you'll get errors similar to
"volume doesn’t implement mount"
$ dbus-launch bash

### Mount the CIFS share.  Provide the user credentials on the commandline
$ gio mount smb://servername/sharename
User [myuser]:
Domain [SAMBA]:
Password:

### Optional, list info about the share
$ gio mount --list --detail

### At this point, your mount point is accessible from the .gvfs directory
in the user's home directory.
### FYI if you are running a Gnome desktop, the mount point is in
/run/user/
$ ls ~/.gvfs
smb-share:server=servername,share=sharename

### Unmount the share
$ gio mount -u smb://servername/sharename

So it really comes down to which user should mount the Windows share, the
root user or the normal user, because there are different answers for
each.  Hope this helps and isn't totally off base from what you were asking.
-Brad

---

Brad Hinson

Principal Solution Architect

Red Hat <https://www.redhat.com/>

bhin...@redhat.com
M: 919-360-0443
<https://www.redhat.com/>



On Mon, Apr 20, 2020 at 5:32 AM Peter  wrote:

> I mean authority based mount where we specify UID while doing mount
>
> On Mon, 20 Apr, 2020, 4:14 PM Aria Bamdad,  wrote:
>
> > I don't understand your exact need but through the credentials= option
> and
> > multiple credential files, you can provide for a series of different user
> > name/password pairs.
> >
> > -Original Message-----
> > From: Linux on 390 Port  On Behalf Of Peter
> > Sent: Sunday, April 19, 2020 12:59 PM
> > To: LINUX-390@VM.MARIST.EDU
> > Subject: Re: Cif mount
> >
> > Thank you
> >
> > Is it possible to mount cif with multiple uid at once ?
> >
> > On Thu, 16 Apr, 2020, 5:54 PM Aria Bamdad,  wrote:
> >
> > > Peter,
> > >
> > > I don't know if your windows file server is a Samba also or it is
> > actually
> > > a windows server.  In my environment, I use SAMBA as the file server
> and
> > > then on the Linux side, I use the uid= and gid= arguments of the cifs
> > mount
> > > to force specific user/groups.  Perhaps that may be of help in your
> > > situation.
> > >
> > > Aria
> > >

Re: Cif mount

2020-04-20 Thread Peter
I mean authority based mount where we specify UID while doing mount

On Mon, 20 Apr, 2020, 4:14 PM Aria Bamdad,  wrote:

> I don't understand your exact need but through the credentials= option and
> multiple credential files, you can provide for a series of different user
> name/password pairs.
>
> -Original Message-
> From: Linux on 390 Port  On Behalf Of Peter
> Sent: Sunday, April 19, 2020 12:59 PM
> To: LINUX-390@VM.MARIST.EDU
> Subject: Re: Cif mount
>
> Thank you
>
> Is it possible to mount cif with multiple uid at once ?
>
> On Thu, 16 Apr, 2020, 5:54 PM Aria Bamdad,  wrote:
>
> > Peter,
> >
> > I don't know if your windows file server is a Samba also or it is
> actually
> > a windows server.  In my environment, I use SAMBA as the file server and
> > then on the Linux side, I use the uid= and gid= arguments of the cifs
> mount
> > to force specific user/groups.  Perhaps that may be of help in your
> > situation.
> >
> > Aria
> >
> > -Original Message-
> > From: Linux on 390 Port  On Behalf Of Peter
> > Sent: Thursday, April 16, 2020 1:03 AM
> > To: LINUX-390@VM.MARIST.EDU
> > Subject: Cif mount
> >
> > Hello
> >
> > I have installed cifs-utils and samba.
> >
> > While mounting a windows share I gave a users UID who will have access to
> > that share from Linux. Now I would like to have another set of user who
> > need access to that Share.
> >
> > Is there a way to permit access to more than one user for a CIF mount ?
> >
> > Peter
> >
> > --
> > For LINUX-390 subscribe / signoff / archive access instructions,
> > send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> > visit
> > http://www2.marist.edu/htbin/wlvindex?LINUX-390
> >
> > --
> > For LINUX-390 subscribe / signoff / archive access instructions,
> > send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> > visit
> > http://www2.marist.edu/htbin/wlvindex?LINUX-390
> >
>
> --
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> visit
> http://www2.marist.edu/htbin/wlvindex?LINUX-390
>
> --
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> visit
> http://www2.marist.edu/htbin/wlvindex?LINUX-390
>

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390


Re: Cif mount

2020-04-20 Thread Aria Bamdad
I don't understand your exact need but through the credentials= option and 
multiple credential files, you can provide for a series of different user 
name/password pairs.

-Original Message-
From: Linux on 390 Port  On Behalf Of Peter
Sent: Sunday, April 19, 2020 12:59 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: Cif mount

Thank you
 
Is it possible to mount cif with multiple uid at once ?
 
On Thu, 16 Apr, 2020, 5:54 PM Aria Bamdad,  wrote:
 
> Peter,
>
> I don't know if your windows file server is a Samba also or it is actually
> a windows server.  In my environment, I use SAMBA as the file server and
> then on the Linux side, I use the uid= and gid= arguments of the cifs mount
> to force specific user/groups.  Perhaps that may be of help in your
> situation.
>
> Aria
>
> -Original Message-
> From: Linux on 390 Port  On Behalf Of Peter
> Sent: Thursday, April 16, 2020 1:03 AM
> To: LINUX-390@VM.MARIST.EDU
> Subject: Cif mount
>
> Hello
>
> I have installed cifs-utils and samba.
>
> While mounting a windows share I gave a users UID who will have access to
> that share from Linux. Now I would like to have another set of user who
> need access to that Share.
>
> Is there a way to permit access to more than one user for a CIF mount ?
>
> Peter
>
> --
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> visit
> http://www2.marist.edu/htbin/wlvindex?LINUX-390
>
> --
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> visit
> http://www2.marist.edu/htbin/wlvindex?LINUX-390
>
 
--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390


Re: Cif mount

2020-04-19 Thread Peter
Thank you

Is it possible to mount cif with multiple uid at once ?

On Thu, 16 Apr, 2020, 5:54 PM Aria Bamdad,  wrote:

> Peter,
>
> I don't know if your windows file server is a Samba also or it is actually
> a windows server.  In my environment, I use SAMBA as the file server and
> then on the Linux side, I use the uid= and gid= arguments of the cifs mount
> to force specific user/groups.  Perhaps that may be of help in your
> situation.
>
> Aria
>
> -Original Message-
> From: Linux on 390 Port  On Behalf Of Peter
> Sent: Thursday, April 16, 2020 1:03 AM
> To: LINUX-390@VM.MARIST.EDU
> Subject: Cif mount
>
> Hello
>
> I have installed cifs-utils and samba.
>
> While mounting a windows share I gave a users UID who will have access to
> that share from Linux. Now I would like to have another set of user who
> need access to that Share.
>
> Is there a way to permit access to more than one user for a CIF mount ?
>
> Peter
>
> --
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> visit
> http://www2.marist.edu/htbin/wlvindex?LINUX-390
>
> --
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> visit
> http://www2.marist.edu/htbin/wlvindex?LINUX-390
>

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390


Re: Cif mount

2020-04-16 Thread Aria Bamdad
Peter,

I don't know if your windows file server is a Samba also or it is actually a 
windows server.  In my environment, I use SAMBA as the file server and then on 
the Linux side, I use the uid= and gid= arguments of the cifs mount to force 
specific user/groups.  Perhaps that may be of help in your situation.

Aria

-Original Message-
From: Linux on 390 Port  On Behalf Of Peter
Sent: Thursday, April 16, 2020 1:03 AM
To: LINUX-390@VM.MARIST.EDU
Subject: Cif mount

Hello
 
I have installed cifs-utils and samba.
 
While mounting a windows share I gave a users UID who will have access to
that share from Linux. Now I would like to have another set of user who
need access to that Share.
 
Is there a way to permit access to more than one user for a CIF mount ?
 
Peter
 
--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390


Cif mount

2020-04-15 Thread Peter
Hello

I have installed cifs-utils and samba.

While mounting a windows share I gave a users UID who will have access to
that share from Linux. Now I would like to have another set of user who
need access to that Share.

Is there a way to permit access to more than one user for a CIF mount ?

Peter

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390