변군이글루

[리눅스] UMASK 변경 쉘 본문

프___기타

[리눅스] UMASK 변경 쉘

변군 변군이글루 2014.11.24 10:14

 

여러 계정 UMASK 변경 쉘

 

# cat z.sh

#!/bin/sh

 

USERHOME=`grep "comicts\|lon" /etc/passwd | awk -F: {'print $6'}`

 

for USERUMASK in $USERHOME

do

           #echo $USERUMASK

           echo -e "\n" >> $USERUMASK/.bashrc

           echo "##umask" >> $USERUMASK/.bashrc

           echo "umask 0002" >> $USERUMASK/.bashrc

           source $USERUMASK/.bashrc

           tail -n 2 $USERUMASK/.bashrc

done

 

 

0 Comments
댓글쓰기 폼