UnixPedia : HPUX / LINUX / SOLARIS: HPUX : Umask wrapper for account

Friday, April 25, 2014

HPUX : Umask wrapper for account



Umask wrapper for account.
Overview
Umask wrapper for account
Procedures
Create a file /usr/local/bin/umask-wrapper with the following contents

#!/usr/bin/ksh

umask 022
exec /usr/bin/ksh -c "${SSH_ORIGINAL_COMMAND:-$SHELL}"

#make the file executable : /usr/local/bin/umask-wrapper
and then edit the ssh configuration file /etc/opt/ssh/sshd_config and add the following lines in the end

Match User monora
ForceCommand /usr/local/bin/umask-wrapper


This should help in picking up the desired umask value  for monora user. It will not affect other users as the script will only be executed for monora user.
Keywords.
Sshd, umask.

No comments:

Post a Comment