Skip to content

Instantly share code, notes, and snippets.

@inadarei
Created November 29, 2014 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inadarei/d90427a6f422c09936fc to your computer and use it in GitHub Desktop.
Save inadarei/d90427a6f422c09936fc to your computer and use it in GitHub Desktop.
Check Umasks for Bash Users
#!/bin/bash
for user in $(awk -F: '( $3 >= 500 ){print $1}' /etc/passwd);
do
mask=`sudo su -c 'umask' -l $user 2>/dev/null`
echo $user $mask
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment