Advertisement
Combreal

installConfSMB.txt

Mar 11th, 2021
1,124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. samba => Create a samba-specific account.
  4. a. Create a samba account and manage it centrally through a single account.
  5. b. All Samba accounts for regular users are added and managed through smbpasswd.
  6.  
  7. Add Samba user and set Samba login password “Just sample User => simmon”
  8. smbpasswd -a “Samba user account”
  9.  
  10. [root@nalkal simmon]# dnf install samba*
  11. [root@nalkal simmon]# smbpasswd -a simmon
  12. New SMB password:
  13. Retype new SMB password:
  14. Added user simmon.
  15.  
  16. Allow and set the samba port (samba port 139,445)
  17.  
  18. [root@nalkal simmon]# firewall-cmd --permanent --zone=public --add-port=139/tcp
  19. success
  20. [root@nalkal simmon]# firewall-cmd --permanent --zone=public --add-port=445/tcp
  21. success
  22. [root@nalkal simmon]#  firewall-cmd --reload
  23. success
  24.  
  25. Configuring the samba Environment
  26. Allow directories to share specify the storage location as /home/share, and also use the user account.
  27.  
  28. a. Public place samba setting
  29.  
  30. [root@nalkal simmon]# mkdir /home/share
  31. [root@nalkal simmon]# chmod 777 /home/share
  32.  
  33. b. Preferences ( /etc/samba/smb.conf )
  34.  
  35. [smbshare]
  36. comment = samba service
  37. path = /home/share
  38. public = yes
  39. writable = yes
  40. write list = samba
  41. create mask = 0777
  42. directory mask = 0777
  43.  
  44. Service Settings
  45.  
  46. [root@nalkal samba]# systemctl enable smb
  47. Created symlink /etc/systemd/system/multi-user.target.wants/smb.service → /usr/lib/systemd/system/smb.service.
  48. [root@nalkal samba]# systemctl start smb
  49.  ● smb.service - Samba SMB Daemon
  50. Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
  51. Active: active (running) since Fri 2019-07-19 02:34:54 KST; 2min 57s ago
  52. Docs: man:smbd(8)
  53.     man:samba(7)
  54.     man:smb.conf(5)
  55. Main PID: 9218 (smbd)
  56. Status: "smbd: ready to serve connections..."
  57.  Tasks: 4 (limit: 1141)
  58.  Memory: 13.7M
  59.  CGroup: /system.slice/smb.service
  60.        ├─9218 /usr/sbin/smbd --foreground --no-process-group
  61.        ├─9220 /usr/sbin/smbd --foreground --no-process-group
  62.        ├─9221 /usr/sbin/smbd --foreground --no-process-group
  63.        └─9222 /usr/sbin/smbd --foreground --no-process-group
  64.  
  65. 719 02:34:54 nalkal systemd[1]: Starting Samba SMB Daemon...
  66. 719 02:34:54 nalkal systemd[1]: Started Samba SMB Daemon.
  67. 719 02:34:54 nalkal smbd[9218]: [2019/07/19 02:34:54.599592,  0] ../../lib/util/become_daemon.c:135(daemo>
  68. 719 02:34:54 nalkal smbd[9218]:   daemon_ready: daemon 'smbd' finished
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement