How to access samba server in Ubuntu without password

Time: 2017-05-24Source: Huajun InformationAuthor: Five Horses Acacia

How to access samba server in Ubuntu without password

Assume that the shared directory is /var/wwwroot

sudo vim /etc/samba/smb.conf

Modify the content in the file [gloab] from security=user to security=share

Add the following lines at the end of the file:

[share]

path=/var/wwwroot

available=yes

browseable=yes

public=yes

writable=yes

guest OK = yes

[global] defines global configuration, and workgroup is used to define workgroups. I believe that if you have installed a Windows system, you will be familiar with this workgroup. Under normal circumstances, we need to change MYGROUP here to WORKGROUP (the default workgroup name of Windows).

security = user #Specify the security level of samba here. There are four types of security levels:

share: Users can log in to the samba server without an account or password.

user: The samba server providing the service is responsible for checking the account and password (default)

server: another windows or samba server is responsible for checking accounts and passwords

domain: Specify the windows domain control server to verify the user's account and password.

The default group of the samba service installed in ubuntu is WORKGROUP. Use the command to test:

sudo smbclient -L //localhost/wwwroot

Tips:

WARNING: The security=share option is deprecated

Enter root’s password:

There is no need to enter the password, just press Enter.

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3]

Sharename Type Comment

——————- ——-

print$ Disk Printer Drivers

wwwroot Disk

IPC$ IPC IPC Service (precise32 server (Samba, Ubuntu))

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3]

Server Comment

——————-

PRECISE32 precise32 server (Samba, Ubuntu)

Workgroup Master

——————-

WORKGROUP

You can see that wwwroot has been used as a shared disk.

The above is an introduction to the method of accessing the samba server without a password in the Ubuntu system. If you find password access troublesome or cannot remember the password, you can access the samba server through the method introduced in this article.

Related articles更多>>