As the default value for 'force_standard_program_map_env' from autofs.conf(5) is 'no', for a program map that uses the UID and GID standard environment variables they are prefixed with "AUTOFS_". To match the behaviour under default conditions of 'force_standard_program_map_env' use AUTOFS_UID and AUTOFS_GID in the sample code for the auto.smb program map. Link: https://bugs.debian.org/949075 Signed-off-by: Salvatore Bonaccorso <carnil@xxxxxxxxxx> --- Changes in v2: - Fix typo 'prevised' -> 'prefixed' samples/auto.smb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/auto.smb b/samples/auto.smb index f6d41d35f121..faa5a0acebc6 100755 --- a/samples/auto.smb +++ b/samples/auto.smb @@ -24,7 +24,7 @@ get_krb5_cache() { cache= - uid=${UID} + uid=${AUTOFS_UID} for x in $(ls -d /run/user/$uid/krb5cc_* 2>/dev/null); do if [ -d "$x" ] && klist -s DIR:"$x"; then cache=DIR:$x @@ -53,12 +53,12 @@ done creds=/etc/creds/$key if [ -f "$creds" ]; then - opts="$opts"',uid=$UID,gid=$GID,credentials='"$creds" + opts="$opts"',uid=${AUTOFS_UID},gid=${AUTOFS_GID},credentials='"$creds" smbopts="-A $creds" else get_krb5_cache if [ -n "$cache" ]; then - opts="$opts"',multiuser,cruid=$UID,sec=krb5i' + opts="$opts"',multiuser,cruid=${AUTOFS_UID},sec=krb5i' smbopts="-k" export KRB5CCNAME=$cache else -- 2.45.2