Discussion:
[Samba] File Server on Samba 4
Marcio Demetrio Bacci
2016-08-01 04:40:26 UTC
Permalink
I want it when a user if to authenticate to the system a network mapping to
be automatically mounted by the /etc/fstab

Sample:
//192.168.200.3/Commercial /media/Commercial cifs
auto,users,username=<domain-user>,passwor=<password>

How do I get the domain username of the user logged and the password to set
up the mapping?

If isn't possible, what is the best way ?

I'm using Ubuntu 14 as Client.

Regards,

Márcio
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
Nico Kadel-Garcia
2016-08-01 09:19:50 UTC
Permalink
On Mon, Aug 1, 2016 at 12:40 AM, Marcio Demetrio Bacci
Post by Marcio Demetrio Bacci
I want it when a user if to authenticate to the system a network mapping to
be automatically mounted by the /etc/fstab
//192.168.200.3/Commercial /media/Commercial cifs
auto,users,username=<domain-user>,passwor=<password>
/media is not for NFS. It's for local physical media.

You configure autofs to mount at /mnt/Commercial/[User], and put the
credentials in the user's $HOME/.commercial.creds, and you should be
able to activate *any* individual's user's mounting of the content,
with their default ownership, with their individual credentials.
Post by Marcio Demetrio Bacci
How do I get the domain username of the user logged and the password to set
up the mapping?
See above. Never put individual user passwords in /etc/fstab, it needs
to be readable by all users. There are also risks putting those
credentials on the user's home directory, but it's slightly less
dangerous.

If you'd like to be somewhat safer, use Kerberized credentials to
allow users to automount their own content, as described at
https://runops.wordpress.com/2015/03/05/setup-linux-cifs-autofs-automount-using-kerberos-authentication/
Post by Marcio Demetrio Bacci
If isn't possible, what is the best way ?
I'm using Ubuntu 14 as Client.
Regards,
Márcio
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
mathias dufresne
2016-08-01 14:19:44 UTC
Permalink
Not an answer to initial question:
No matter the type of file system (NFS, SMB/CIFS...) nor the kind of
support (network share, USB pen, CDROM...).

What matters is if the file system will be mounted by hand (fstab, mount)
or auto-magically with automounter (autofs or any other).

Once automounter uses some directory for automounting stuffs in it, this
folder is not usable as usual.

Ex: /media is used by some automounter, we can't mkdir /media/toto.
You can't "mount /dev/sdb1 /media" nor "mount /dev/sdb1 /media/sdb1", even
if /media/sdb1 exists.

You can create your own directories to host remote FS, you can use /mnt,
you can use /media if you stopped all automounter tool.

Sorry for that which is a little bit out of subject.
Post by Nico Kadel-Garcia
On Mon, Aug 1, 2016 at 12:40 AM, Marcio Demetrio Bacci
Post by Marcio Demetrio Bacci
I want it when a user if to authenticate to the system a network mapping
to
Post by Marcio Demetrio Bacci
be automatically mounted by the /etc/fstab
//192.168.200.3/Commercial /media/Commercial cifs
auto,users,username=<domain-user>,passwor=<password>
/media is not for NFS. It's for local physical media.
You configure autofs to mount at /mnt/Commercial/[User], and put the
credentials in the user's $HOME/.commercial.creds, and you should be
able to activate *any* individual's user's mounting of the content,
with their default ownership, with their individual credentials.
Post by Marcio Demetrio Bacci
How do I get the domain username of the user logged and the password to
set
Post by Marcio Demetrio Bacci
up the mapping?
See above. Never put individual user passwords in /etc/fstab, it needs
to be readable by all users. There are also risks putting those
credentials on the user's home directory, but it's slightly less
dangerous.
If you'd like to be somewhat safer, use Kerberized credentials to
allow users to automount their own content, as described at
https://runops.wordpress.com/2015/03/05/setup-linux-cifs-autofs-automount-using-kerberos-authentication/
Post by Marcio Demetrio Bacci
If isn't possible, what is the best way ?
I'm using Ubuntu 14 as Client.
Regards,
Márcio
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
Continue reading on narkive:
Loading...