Guest User

Untitled

a guest
Jan 30th, 2013
204
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. home_dir=/hdd0/HomeFolders
  4. user_name="`echo $1 | /usr/bin/tr '[:upper:]' '[:lower:]' | egrep -v _`"
  5.  
  6. if [ ! -d /hdd0/HomeFolders/"$user_name" ]
  7. then
  8. # Create user directory
  9. /bin/mkdir -p "$home_dir/${user_name}";
  10.  
  11. # Modify ACL User
  12. smbcacls --user=DOMAIN\\Administrator%ПАРОЛЬ //dataserv/HomeFolders ${user_name} -S='ACL:DOMAIN\'${user_name}':ALLOWED/0x3/FULL'
  13.  
  14. # Add ACL DOMAIN\Администраторы домена
  15. smbcacls --user=DOMAIN\\Administrator%ПАРОЛЬ //dataserv/HomeFolders ${user_name} -a='ACL:DOMAIN\Администраторы домена:ALLOWED/0x3/FULL'
  16.  
  17. # Modify ACL OWNER
  18. smbcacls --user=DOMAIN\\Administrator%ПАРОЛЬ//dataserv/HomeFolders ${user_name} -M OWNER:DOMAIN\\administrator
  19. fi
RAW Paste Data