[Samba] File Server on Samba 4

Nico Kadel-Garcia nkadel at gmail.com
Mon Aug 1 09:19:50 UTC 2016

On Mon, Aug 1, 2016 at 12:40 AM, Marcio Demetrio Bacci
<marciobacci at gmail.com> wrote:
> I want it when a user if to authenticate to the system a network mapping to
> be automatically mounted by the /etc/fstab
> Sample:
> //   /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.

> 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

If you'd like to be somewhat safer, use Kerberized credentials to
allow users to automount their own content, as described at

> 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

More information about the samba mailing list