Skip to content

Instantly share code, notes, and snippets.

@Guymer

Guymer/.pylintrc

Last active Mar 7, 2021
Embed
What would you like to do?
[MESSAGES CONTROL]
disable=bad-continuation,bad-whitespace,c-extension-no-member,import-outside-toplevel,invalid-name,line-too-long,missing-docstring,too-many-arguments,too-many-branches,too-many-locals,too-many-nested-blocks,too-many-statements
[TYPECHECK]
ignored-classes=boto3,cartopy,ephem,exifread,lxml,magic,matplotlib,matplotlib.cm,numpy,scipy,shapely,sysctl
ignored-modules=boto3,cartopy,ephem,exifread,lxml,magic,matplotlib,matplotlib.cm,numpy,scipy,shapely,sysctl
source=/Users/guymer/.bashrc
# add all users to "staff"
pw groupmod staff -m user1,user2,user3,user4
# add "user1" to "wheel"
pw groupmod wheel -m user1
# add SFTP-only users to custom group
pw groupadd sftp_only -m user3,user4
# forbid "user4" from logging in
pw usermod user4 -s /usr/sbin/nologin
# Set secure umasks
echo umask=0077 > /home/user1/.profile
echo umask=0077 > /home/user2/.profile
echo umask=0077 > /home/user3/.profile
echo umask=0077 > /home/user4/.profile
# Setup "vim"
echo "syntax on" > /home/user1/.vimrc
echo "syntax on" > /home/user2/.vimrc
echo "syntax on" > /home/user3/.vimrc
echo "syntax on" > /home/user4/.vimrc
# Make users own their folders
chown user1:staff /home/user1 /mnt/data/user1 /mnt/timecapsule/user1
chown user2:staff /home/user2 /mnt/data/user2 /mnt/timecapsule/user2
chown user3:staff /home/user3 /mnt/data/user3 /mnt/timecapsule/user3
chown user4:staff /home/user4 /mnt/data/user4 /mnt/timecapsule/user4
# Make private folders private
chmod 700 /home/user1 /home/user2 /home/user3 /home/user4
chmod 700 /mnt/timecapsule/user1 /mnt/timecapsule/user2 /mnt/timecapsule/user3 /mnt/timecapsule/user4
# Make shared (parent) folders group read-only
chmod 755 /mnt/data/user1 /mnt/data/user2 /mnt/data/user3 /mnt/data/user4
# Make sure that users can get to their folders
chgrp staff /home /mnt /mnt/data /tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment