Update 'SambaInstall.md'
This commit is contained in:
+11
-5
@@ -1,22 +1,26 @@
|
|||||||
##Install Samba server
|
##Install Samba server
|
||||||
|
|
||||||
|
1. Install Samba
|
||||||
```bash
|
```bash
|
||||||
sudo apt install samba smbclient cifs-utils samba-vfs-modules -y
|
sudo apt install samba smbclient cifs-utils samba-vfs-modules -y
|
||||||
```
|
```
|
||||||
|
2. Create public share folder and shared file inside
|
||||||
```bash
|
```bash
|
||||||
mkdir public
|
mkdir public
|
||||||
|
|
||||||
touch /home/canary/public/finance.xlsx
|
touch /home/canary/public/finance.xlsx
|
||||||
```
|
```
|
||||||
|
3. Edit Samba config file
|
||||||
```bash
|
```bash
|
||||||
|
#Backup original file
|
||||||
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.backup
|
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.backup
|
||||||
|
|
||||||
|
#Create new file
|
||||||
sudo nano /etc/samba/smb.conf
|
sudo nano /etc/samba/smb.conf
|
||||||
|
|
||||||
|
#Put following congiuration
|
||||||
[global]
|
[global]
|
||||||
interfaces = 195.130.34.133/28 eth0
|
interfaces = xxx.xxx.xxx.xxx/xx eth0
|
||||||
workgroup = csec.local
|
workgroup = csec.local
|
||||||
server string = FileServer
|
server string = FileServer
|
||||||
netbios name = FILESRV01
|
netbios name = FILESRV01
|
||||||
@@ -51,10 +55,12 @@ sudo nano /etc/samba/smb.conf
|
|||||||
read only = yes
|
read only = yes
|
||||||
browseable = yes
|
browseable = yes
|
||||||
```
|
```
|
||||||
|
4. Edit Rsyslog
|
||||||
```bash
|
```bash
|
||||||
sudo nano /etc/rsyslog.conf
|
sudo nano /etc/rsyslog.conf
|
||||||
|
|
||||||
|
#Put following configuration
|
||||||
|
|
||||||
# /etc/rsyslog.conf configuration file for rsyslog
|
# /etc/rsyslog.conf configuration file for rsyslog
|
||||||
#
|
#
|
||||||
# For more information install rsyslog-doc and see
|
# For more information install rsyslog-doc and see
|
||||||
@@ -148,7 +154,7 @@ mail.err /var/log/mail.err
|
|||||||
#
|
#
|
||||||
*.emerg :omusrmsg:*
|
*.emerg :omusrmsg:*
|
||||||
```
|
```
|
||||||
|
5. Create Samba audit log file and change owner
|
||||||
```bash
|
```bash
|
||||||
sudo touch /var/log/samba-audit.log
|
sudo touch /var/log/samba-audit.log
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user