sambaservice configuration
Server:
-
sambaServer adds users:
#pdbedit -L //listSambauser list
#pdbedit -a username //NewSambausers, note that this user must belinuxusers in the system
( #ls -l /var/lib/samba/private/passdb.tdbDatabase users
can be usedpdbeditCommand to view users in the database, you can also build and delete the in this databasesambaUser.UsepdbeditModificationSambaUsercommandas follows:
#pdbedit -a username //Newly builtSambaUser, note that this user must belinuxUsers in the system
#pdbedit -x username //DeleteSambaUser
#pdbedit -L //listSambaUser List,Readpassdb.tdbdatabase file
#pdbedit -Lv //listSambaUser list details
#pdbedit -c “[D]” -u username //SambaUser’s account
#pdbedit -c “[]” -u username //Restore itSambaUser’s account )
-
OpensambaService:
Note: At this time, the user name and password can be achieved.
-
Modify the configuration file to implement other settings
Configuration file:/etc/samba/smb.conf
WindowClient:
1, first guarantee the network is OKping.
and then enter the user name and password to enter. Open the following folder automatically:
2、Discard connection:
LinuxClient:
-
Installationsmbclient
-
ViewsambaServer resources:
Smbclient -L 192.168.248.140
-
Login:
touseridentity login:
#smbclient // 192.168.248.140/user -U user
Seeing appearingsmb:>The prompt, indicating that it has been successfully logged insambaServer.
Anonymous login: (pre -modified configuration file/etc/samba/smb.conf)
#smbclient // 192.168.248.140/public
Question
-
When logging in anonymous:
Solution: The configuration file will be[share]change to[public],securitySet toshare
[public]
comment = Public Stuff
path = /public
public = yes
guest ok = yes
browseable = yes
writable = yes