Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. WINDOWS - do this first:
  2. Create shared folder <newshare>
  3. Create fileshare user <newuser>
  4.  
  5. Share permissions on <newshare>:
  6. <newuser> read/write
  7. Advanced sharing | permissions - change, read.
  8. Security:
  9. uncheck 'Full control' for <newuser>
  10.  
  11.  
  12. Linux
  13. sudo to root [$sudo -s]
  14. Create new group - e.g. windowshare [$groupadd windowshare]
  15. Create new folder - e.g. /mounts/windows
  16. Create new user and add to new group - e.g. customeruser [$useradd -m 0d /home/customeruser -s /bin/bash -G windowshare -U customeruser]
  17. Create folder 'cifs' in /etc
  18. Change permissions on folder to 600 (user root)
  19. Create .smbcredentials file in /etc/cifs with <newuser> windows credentials with user=<newuser> CR password=<password>
  20. Create new line in /etc/fstab: //WINDOWSSERVER/share$ /mounts/windows cifs gid=windowshare,credentials=/etc/cifs/.smbcredentials,iocharset=utf8,sec=ntlm,file_mode=0770,dir_mode=0770 0 0
  21. Put 'mount /mounts/windows in /etc/rc.local to ensure shares mount at boot time if necessary.
  22. run 'mount -a' as root
  23. check customeruser user permissions on share:
  24. $su - customeruser [enter password]
  25. $cd /mounts/windows
  26. $touch testfile.txt [should see file appear on windows share]
  27. $mkdir testfilectory
  28. $rm -rf testfilectory
  29. $rm testfile.txt
  30. $exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement