LAN samba configuration and access in Windows environment

First install samba in the linux environment

sudo apt-get install samba samba-common

After the installation is successful, create a new folder in any path. This folder is the shared folder. I named it share. The path where the folder is located needs to be noted down as it will be used later.

View the path of the folder,

Then create a new folder

Then give the file the highest permission

Then configure the samba configuration file

sudo vim /etc/samba/smb.conf

Add the following at the end of the text:

save and exit

Next create a user

sduo  touch /etc/samba/smbpasswd

sudo smbpasswd -a username

The user name here is not arbitrarily named, it is consistent with the user name currently logged in to Linux, otherwise the following error will occur.

After the configuration is successful, restart samba

sudo /etc/init.d/smbd restart

Next, test in the window environment

Use the shortcut key win+R

Type \\ip in the search bar

The login interface appears, enter the created account password, and you can see the shared folder.

Guess you like

Origin blog.csdn.net/qq_25105061/article/details/81662497