[Samba] ntfs user mappings?

Jeff Sadowski jeff.sadowski at gmail.com
Wed Nov 8 21:08:14 UTC 2017


:-( ntfs-3g needs work.

My mapping must be working as I see some of the correct users and acl
rules look correct. But it looks like ntfs-3g is a bit incomplete at
least on my ubuntu 16.04 install.

On Mon, Nov 6, 2017 at 4:29 AM, Rowland Penny via samba
<samba at lists.samba.org> wrote:
> On Sun, 5 Nov 2017 16:14:33 -0700
> Jeff Sadowski <jeff.sadowski at gmail.com> wrote:
>
>> Not bad but I wanted an ldap version because I was having issues
>> running ldbsearch as a normal user.
>>
>
> I had another thought, why am I reinventing the wheel, so came up with
> this:
>
> #!/bin/bash
>
> echo "#######################################################"
> echo "#                                                     #"
> echo "#      Please Wait whilst Usermap is created.         #"
> echo "#                                                     #"
> echo "#######################################################"
>
> ## Remove any existing usermap
> if [ -f  /tmp/ntfs-3g.usermap ]; then
>     rm -f /tmp/ntfs-3g.usermap
> fi
>
> WBINFO=$(which wbinfo)
> if [ -z "${WBINFO}" ]; then
>     echo
>     echo "Cannot find 'wbinfo', is it installed?"
>     echo "Cannot continue...Exiting"
>     exit 1
> fi
>
> ## Get users
> ADUSERS=$(${WBINFO} -u)
>
> ## Get groups
> ADGROUPS=$(${WBINFO} -g)
>
> while IFS= read -r line
> do
>   SID=$(${WBINFO} -n "$line" | awk '{print $1}')
>   echo "$line::$SID" >> /tmp/ntfs-3g.usermap
> done <<< "$ADUSERS"
>
> while IFS= read -r line
> do
>   SID=$(${WBINFO} -n "$line" | awk '{print $1}')
>   echo ":$line:$SID" >> /tmp/ntfs-3g.usermap
> done <<< "$ADGROUPS"
>
> if [ -f /tmp/ntfs-3g.usermap ]; then
>     echo
>     echo "Usermap created in /tmp/ntfs-3g.usermap"
>     echo
> fi
>
> exit 0
>
> Anybody can run this, the only problem was '/etc/', only 'root' can
> write into this directory, so I used '/tmp/' instead.
>
> Rowland
>
> --
> 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