samba repair

Prior has told a samba unable to connect situations, this encounter is dependent samba be restored after damaged.

 

Note: may not be very detailed, because of time reasons, it may be incomplete or missing records and screenshots. And recording reference.

Problem: Because of ubuntu system do not quite understand, colleagues use Baidu server directly execute some commands cause a lot of dependencies are changed, samba unable to connect.

solve:

1. Current server main function is compiled, visit. Try the next, compiling OK, not bad-related environment. ssh access is also normal. If you have a problem you may want to reinstall, you try to solve here.

2. Try reinstalling ldd and get an error message.

I found two dependent changes, resulting in not installed.

//ldd:
~# ldd /usr/sbin/smbd
~# ldd /usr/sbin/nmbd
//安装:
~# apt-get install -f samba

3. uninstall both dependent on, and then reinstall it.

// unload dependent, EG: 
~ # APT- GET autoremove samba- the Common
 // reinstall, 
~ # APT- GET install Samba --reinstall

4. After the restart the service, still unable to access

// restart the service 
~ # Service smbd restart
 ~ # nmbd restart Service

5. Next can only view log, detailed analysis. 

log in / var / log / samba /, first empty the log in this directory, and then execute the relevant view.

log.smbd -> You can see the log when the service starts smbd

log.nmbd -> You can see when the service starts nmbd log

log.192.168.149.100 -> ask the remote connection log, ip corresponding to that client station IP .

These log emptied after the implementation of view, is very short, it is easy to see the problem.

 

Following is a brief column, you see the problem from the log in a few of this encounter:

  • Failed to initialize the registry: WERR_CAN_NOT_COMPLETE

-> Delete to registry.tdb

rm -rf /var/lib/samba/registry.tdb
  • Ignoring unknown parameter "valid user"

-> problem when the configuration file /etc/samba/smb.conf configuration file sharing, valid user of this parameter can be changed to valid users.

After a normal start, usually the server is OK

  • init_smb_request: invalid wct number 255

-> should be the client's problem, the specific cause is not clear. Restart the computer can be connected (before normal access).

If not, look at whether it is win10, win10 need to check the SMB 1.0 (also stresses In that mentioned at the beginning). And server versions may also be related, have a specific look.

  • Got user=[xxxx] domain=[xxxxx] workstation=[xxxxx] len1=24 len2=224

-> Access client input user information such as the domain name to see if it is correct.

Guess you like

Origin www.cnblogs.com/fanglongxiang/p/12133384.html