Linux Samba server Construction
1. Samba: Server Messages Block (SMB) is a communication protocol for sharing files and printers on a LAN,
It provides sharing services for files, printers, and other resources between different computers in the LAN.
2. install the samba server: sudo apt-get install samba;
3. Configure the samba server: sudo vim/etc/samba/smb. conf;
In the format of [printers], add the content in the red box below it and set the username to smb,
The shared folder is the home directory.
4. Add an access user (that is, add the user name and password required to log on to the home directory in ubuntu from windows)
(1) Add smb system users:
Command: sudo useradd smb
(2) set the smb User Logon password:
Command: sudo smbpasswd-a smb
5. start, stop, and restart the samba service.
Run the following commands on the terminal:
Start the samba service: sudo/etc/init. d/smbd start
Stop samba: sudo/etc/init. d/smbd stop
Restart the samba service: sudo/etc/init. d/smbd restart
6. restart the Samba service after samba is configured: sudo/etc/init. d/smbd restart;
7. Access the ubuntu shared directory home from win7
Enter the ubuntu IP address in the Start search.