Samba service configuration and samba Configuration
Installation and configuration of the samba service: in Linux, we recommend that you share directories with other hosts in the network.
1. installation:
Sudo apt-get install samba
Ii. Configuration:
1. Create a directory to be shared and modify the permission:
Xx @ ubuntu :~ $ Mkdir linux-tq2440
Xx @ ubuntu :~ $ Sudo chmod 777 linux-tq2440/-R
2. Open the configuration file:
Xx @ ubuntu :~ $ Sudo vim/etc/samba/smb. conf
3. Configure and save the created shared directory and exit:
[Linux-tq2440] # The Name Of The shared directory seen on another host
Path =/home/xx/linux-tq2440 # configure the absolute path of directories shared to other hosts in linux
Available = yes
Browseable = yes
Public = yes
Writable = yes
Iii. Restart the samba service:
Xx @ ubuntu :~ /Linux-tq2440 $ sudo/etc/init. d/smbd restart
Iv. test:
In windows, click:
--> Start
---> RUN
---> \ Linux IP address (for example, \ 192.168.7.5)
5. Set the samba password:
1. Add the following content to the configuration file/etc/samba/smb. conf:
Linux-tq2440
Path =/home/xx/linux-tq2440
Available = yes
Browseable = yes
Public = yes
Writable = yes
Valid users = lpf
2. Set the samba password:
Sudo smbpasswd xx
3. Restart the samba service:
Sudo/etc/init. d/smbd restart