📜 ⬆️ ⬇️

Samba System troubleshooting

This article will essentially be a selection of “Best practie” for Samba system administrators. The basis of the article is the chapter Troubleshooting Techniques from the book Sam's Teach Yourself Samba in 24 Hours. We will try to address the most common mistakes when configuring Samba.

Agree, it is terrible to change the engine in the car, and then find out that she did not go because of the lack of gasoline! Maybe this is not the best metaphor, but many system administrators waste time in vain, without first checking the most obvious things. Look at how the process of finding and solving problems with Samba should line up:



The problems presented at the lower levels of this “pyramid” are the “foundation” for higher levels. Not surprisingly, the Windows client cannot access the file system on Samba if the server is disconnected from the network. Of course, you should not take this picture literally as a guide to action (for example, log files can always be viewed), but you should start with the problems of the lower levels. The higher we rise, the more we delve into the principles of Samba .
In search of a solution to a problem with Samba , first of all, refer to the following resources:
• HOWTO, published on the site ;
• thematic sites and forums, for example: http://samba-doc.ru/ , http://citforum.ru/operating_systems/linux/samba/ ;
Samba documentation sections for a distribution (for example, http://help.ubuntu.ru/wiki/samba , http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch -samba.html or http://wiki.russianfedora.ru/index.php?title=Samba );
http://stackoverflow.com/ - do not forget about this site if you have a specific question or problem;
• auxiliary utilities included in Samba , as well as various traffic analyzers (for example, Wireshark ).
We will first of all consider an independent solution of emerging problems, but do not forget about the possible help of the community. This can seriously save you time and energy.
')
Test environment description
First, a few words about the test environment. The conditions are as follows:
• The Samba server is called TROUBLE and has an IP address of 192.168.7.75 and a mask of 255.255.255.0.
smbd and nmbd run as daemons.
• The Windows client is called win-client .
• The Windows client uses 192.168.7.135 with a network mask of 255.255.255.0.
• Both the win-client and TROUBLE are on the same subnet, so the broadcast request comes from one host to another.
• Both win-client and TROUBLE are members of the LAB working group.
• Samba server uses the following smb.conf :
[global] netbios name = TROUBLE workgroup = LAB security = user encrypt passwords = yes [public] path = /tmp read only = no 


LEVEL 1

The health of the network connection and configuration file


The foundation of our “pyramid” consists of three main problems:
• correctly working TCP / IP connection;
• matching mask and broadcast addresses on servers and clients;
smb.conf file operability.

TCP / IP
To verify TCP / IP, first use the ping command. If the ICMP protocol is described in a very simplified way, the host sends a request to the server and asks, “Are you alive?”. If the server does not respond, the host concludes that it is not connected to the network and therefore unavailable.
 $ ping win-client PING win-client (192.168.7.135) from 192.168.1.74 : 56(84) bytes of data. 64 bytes from win-client (192.168.7.135): icmp_seq=0 ttl=255 time=2.138 msec 64 bytes from win-client (192.168.7.135): icmp_seq=1 ttl=255 time=2.181 msec 64 bytes from win-client (192.168.7.135): icmp_seq=2 ttl=255 time=2.263 msec --- ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/mdev = 2.138/2.194/2.263/0.051 ms 

Also very important is the proper functioning of the DNS. If the name cannot be resolved, a message like this appears:
 $ ping win-client ping: unknown host win-client 

If this happens, the first thing to do is repeat the ping command, but using not the name, but the address:
 $ ping 192.168.7.135 

If the command succeeds, then you should pay attention to the DNS configuration. The most common causes of error:
• Incorrect content of the DNS configuration file /etc/resolv.conf ;
• there is no win-client record on the DNS server;
• DNS server is not available at the moment.
If the ping by IP-address is not successfully performed, then it is worth checking the performance of network equipment on the server, the client and between them.

Broadcast address on server and client
It is possible that the ping will succeed, but the netmask and the broadcast address will not be configured correctly.
In NetBIOS, it is extremely important to correctly resolve the name and search for machines in the network environment so that the server and the client are on the same subnet, i.e. used the same subnet mask and broadcast address.
In our case, the network mask should be 255.255.255.0, and the broadcast address should be 192.168.7.255.
If you are using Linux, you can check which broadcast address and mask are used with the ifconfig command with the interface name as an argument:
 $ /sbin/ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:04:5A:0C:1C:19 inet addr:192.168.7.75 Bcast:192.168.255.255 Mask:255.255.255.0 inet6 addr: fe80::204:5aff:fe0c:1c19/10 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:68006 errors:0 dropped:0 overruns:0 frame:0 TX packets:100783 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:12186135 (11.6 Mb) TX bytes:121642120 (116.0 Mb) Interrupt:3 Base address:0x100 1 

If you see in the output of this command that the broadcast address or netmask is set incorrectly, you should log in as root and set the correct values ​​using the ifconfig command:
 root# ifconfig eth0 192.168.7.75 netmask 255.255.255.0 broadcast 192.168.7.255 

In Windows, similar information can be obtained by issuing the ipconfig / all command.

Verifying the smb.conf file
Since Samba uses a huge number of parameters from the smb.conf file, the developers have created a command line utility that checks the syntax of this file. The utility is called testparm , it is very useful when searching for errors in the configuration file.
You can use the testparm utility with the -s option to analyze a specific configuration file. This option is very well suited for checking the configuration file before using it.
 $ testparm -s /usr/local/samba/lib/smb.conf.new Load smb config files from /usr/local/samba/lib/smb.conf.new Processing section “[public]” Loaded services file OK. # Global parameters [global] coding system = client code page = 850 code page directory = /usr/local/samba/lib/codepages <...  ...> 

After analyzing the specified configuration file, testparm displays all values ​​of the smb.conf file, including default values. This helps ensure that the expected values ​​for the smbd and nmbd configuration parameters are used.
It is worth noting that the default values ​​vary from version to version, so you need to use the Samba version corresponding to the testparm version.

LEVEL 2

Server and client software


The second level involves checking the configuration of client and server software. Our goal is to make sure that both the client and server respond correctly to NetBIOS and CIFS requests. While we are considering in isolation each of the hosts. (At the third level, we will begin to consider their interaction.)

smbd
First of all, smbd must be running. This can be checked using the ps command. The arguments of this command may differ depending on the version of Linux.
 $ ps -ef | grep smbd root 28592 1 0 12:37 ? 00:00:00 /usr/local/samba/bin/smbd -D 

After making sure that smbd is running (or, if necessary, running it), we use the smbclient utility to test the server’s health. The -L parameter is used to list the server resources. The -N switch is used to connect to the server anonymously, so as not to create unnecessary problems with authorization. All these actions must be performed locally on a Samba server.
 smbclient -L TROUBLE -N added interface ip=192.168.7.75 bcast=192.168.1.255 nmask=255.255.255.0 Anonymous login successful Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] Sharename Type --------- ---- public Disk IPC$ IPC Comment ------- IPC Service (Samba 2.2.2) smbclient -L TROUBLE -N added interface ip=192.168.7.75 bcast=192.168.1.255 nmask=255.255.255.0 Anonymous login successful Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] Sharename Type --------- ---- public Disk IPC$ IPC Comment ------- IPC Service (Samba 2.2.2) ADMIN$ Server --------- TROUBLE Workgroup --------- LAB Disk IPC Service (Samba 2.2.2) Comment ------- Samba 2.2.2 Master ------- TROUBLE 

There are two common errors that may occur when performing this check.
The first error is as follows:
 error connecting to 192.168.7.75:139 (Connection refused) Connection to <server> failed 

It occurs if smbd is not running or cannot connect to port 139. This may be caused by previously installed and incorrectly removed Samba components. First of all, you should make sure that smbd starts as a daemon and does not end there with an error. The peculiarity is that nmbd does not display errors in the console window, so you should look at the last few lines of the log file. Later we will look at the log analysis in more detail.
The second most common error looks like this:
 session request to <server> failed (Not listening for calling name) 

You might think that the cause of this error is an incorrect NetBIOS name, but it is not. This error cannot be caused by a “bat” installation of nmbd , nmbd in this case does not even have to be started.
The reason for this error during a local connection is most often the incorrectly configured hosts allow or hosts deny parameters in the smb.conf file. The server terminates the NetBIOS session that is being created.
If we were able to see a list of shared resources, we can check the ability of Samba to authorize users. In this test, an account with the username user1 and the password secret is connected to the [public] share.
 $ smbclient //TROUBLE/public -U user1%secret added interface ip=192.168.7.75 bcast=192.168.1.255 nmask=255.255.255.0 Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \> 

If Samba cannot authorize the user, you will see an error message:
 session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.) 

The reasons for this error can be many. This could be an invalid username or password, or a missing smbpasswd entry for the user, if the encrypt password = yes parameter is set, or an invalid guest account, if access is allowed without authentication.
If the user has logged in correctly, but was unable to access the requested service, smbclient will display the following message:
 tree connect failed: ERRDOS - ERRnosuchshare (You specified an invalid share name) 

This may be caused by an incorrectly written service name, access settings to a shared resource, or an incorrect path expression in the description of the shared resource in the smb.conf file.

nmbd
To check if nmbd is running, we use the ps command again.
 $ ps -ef | grep nmbd root 29054 1 0 15:53 ? 00:00:00 /usr/local/samba/bin/bin/nmbd -D 

If ps shows that nmbd is not running, you should log in as root and run it ( / usr / local / samba / bin / nmbd -D ).
For the test, we will use the Samba utility - nmblookup . Each Samba server has a special name, _Samba_, to which they always respond. By sending a request by this name, we can check the operation of nmbd . The -U switch is used to send a request to a specific address.
 $ ./nmblookup -U 127.0.0.1 __Samba__ querying __Samba__ on 127.0.0.1 192.168.7.75 __Samba__<00> 

If nmbd is not running, the result will be an error:
 name_query failed to find name __Samba__ 

It can also be caused by the fact that the loopback interface is not included in smb.conf when the bind interfaces only = yes parameter is enabled.
After that, we will check if nmbd can register the name TROUBLE.
 $ nmblookup -U 127.0.0.1 TROUBLE querying TROUBLE on 127.0.0.1 192.168.7.75 TROUBLE<00> 

Error messages, for example, “name query failed”, are most likely caused by a failed request for the name _Samba_. Another reason may be that the server cannot register the NetBIOS name. In this case, it is worth finding the server that owns the given name by sending a broadcast request.
 $ nmblookup -B 192.168.1.255 TROUBLE querying TROUBLE on 192.168.1.255 192.168.1.98 TROUBLE<00>  

For example, in this case, this name belongs to a third-party machine, and not to our Samba server. Obviously, the solution to this problem is to rename this machine or server.

Windows NetBIOS Interface

The utility used in Windows for NetBIOS requests — nbtstat.exe — has a few more options that are not found in nmblookup . One of them ( -n ) allows you to "ask" the NetBIOS interface which names it has successfully registered:
 C:\WINDOWS> nbtstat -n Node IpAddress: [192.168.7.135] Scope Id: [] NetBIOS Local Name Table Name Type Status --------------------------------------------- WIN-CLIENT LAB WIN-CLIENT <00> UNIQUE <00> GROUP <03> UNIQUE Registered Registered Registered 

If the “Client for Microsoft Networks” component has not been installed, nbtstat.exe will report the following:
 Failed to access NBT driver 1 

A more subtle error occurs when the Windows client reports that it has registered the name of the workgroup, although it must be the unique name of the workstation.
 Name Type Status --------------------------------------------- LAB <00> GROUP Registered 

Often the reason for this is the presence of a machine with the same NetBIOS name. The Windows client needs a unique name to establish a NetBIOS session with the server. Until the client can register the name of the workstation, he will be unable to, say, view the network environment or mount network drives.

LEVEL 3

Remote access to shared resources

So, we have already found out that both the client and the server have access to the network, and the software works on them locally. At this level, we turn to the diagnosis of the health of their interaction.

Name resolution
We will again use the nmblookup and nbstat.exe utilities to find out if the client can resolve the server name and vice versa. The test will consist of two phases. In the first, we will use a broadcast request to test the server and client responses. This is done by setting the broadcast address (-B 192.168.7.255) in the nmblookup utility when prompted, which involves networking between the server and the client.
First we will try to resolve the server name:
 $ nmblookup -B 192.168.1.255 TROUBLE querying TROUBLE on 192.168.1.255 192.168.7.75 TROUBLE<00> 

After that, we will try to resolve the client name using the same broadcast address.
 $ nmblookup -B 192.168.1.255 win-client querying win-client on 192.168.1.255 192.168.7.135 win-client<00> 

If everything went well so far, this test will most likely work correctly. If the result is an error, you should once again believe that the broadcast address on all machines matches.
After that, we will perform a NetBIOS Node Status Lookup, check the node status. In this step, a direct address is made to the IP address, which asks for a list of unique and group NeBIOS names registered by this host. Let's start with a request to the Samba server from a Windows client.
 C:\WINDOWS\> nbtstat -A 192.168.7.75 NetBIOS Remote Machine Name Table Name Type Status --------------------------------------------- TROUBLE <00> UNIQUE TROUBLE <03> UNIQUE TROUBLE <20> UNIQUE ..__MSBROWSE__.<01> GROUP Registered Registered Registered Registered Registered Registered Registered LAB LAB LAB <00> GROUP <1D> UNIQUE <1E> GROUP MAC Address = 00-00-00-00-00-00 

You can perform the same steps on a Samba server to collect customer information. The options for querying through the nmblookup utility are generally the same as in nbtstat.exe .
 $ nmblookup -A 192.168.7.135 Looking up status of 192.168.7.135 WIN-CLIENT LAB WIN-CLIENT <00> - B <ACTIVE> <00> - <GROUP> B <ACTIVE> <03> - B <ACTIVE> 

If any of these requests fails, you should again check the network connection and NetBIOS interfaces that we considered earlier.

View shared resources from a Windows client
We have already used smbclient to view a list of shared resources. Here we do the same thing, only remotely from a Windows client.
The net.exe utility is a universal utility for working with CIFS. This utility is equivalent to the Linux command smbclient -L . The view option allows you to view the shared resources of the working group, or, if you specify a specific server name (for example, \\ TROUBLE), it will show a list of shared resources on it.

Remote connection to shared resources
In fact, this step is not so much a test as the goal of the whole process. If we log into the console with the correct name and password, the following command will connect drive P: local client to the [public] share on the TROUBLE server.
 C:\WINDOWS\> net use p: \\TROUBLE\public The command completed successfully. 

To determine which name to connect to, you can use the option
 /user:: 
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
 /user:: 
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
 /user:: 
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
 /user:: 
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
 /user:: 
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
 /user:: 
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
 /user:: 
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
 /user:: 
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !
/user::
C:\WINNT\>net use \\TROUBLE\public /user:user1 The password or user name is invalid for \\TROUBLE\public. Type the password for \\TROUBLE\public: The command completed successfully.

, . -, .

4

— . , , , , : .

5
-
. . «» Samba . , . , .

- Samba
, .



smbd (, pid 1234), - root:
root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 0
10, , :
root# smbcontrol 1234 debug 10 root# smbcontrol 1234 debuglevel Current debug level of PID 1234 is 10
: « ?»
, . Windows- . smbd . smbclient , :
$ smbclient //TROUBLE/public -U testuser%test session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
, smbpasswd , — test. ,
log level = 10 log file = /usr/local/samba/var/log.%m
[global] smb.conf , log.TROUBLE :
pdb_getsampwnam: search by name: testuser startsmbfilepwent_internal: opening file /usr/local/samba/private/smbpasswd getsmbfilepwent: returning passwd entry for user root, uid 0 getsmbfilepwent: returning passwd entry for user jerry, uid 786 getsmbfilepwent: returning passwd entry for user guest1, uid 782 getsmbfilepwent: returning passwd entry for user testuser, uid 791 endsmbfilepwent_internal: closed password file. pdb_getsampwnam: found by name: testuser build_sam_account: smbpasswd database is corrupt! username testuser not in unix passwd database! Couldn't find user 'testuser' in passdb.
. Samba testuser. , - /etc/passwd :
#testuser:x:791:100::/dev/null:/bin/false
, (#) , . .
$ smbclient //TROUBLE/public -U testuser%test Domain=[LAB] OS=[Unix] Server=[Samba 2.2.2] smb: \>
. , grep , :
• fail
• error
• unsuccessful
• corrupt
• unknown


— , . -, Wireshark. .

6
Samba
— , - Samba . . , Samba , : .


, Samba . , . :
• 1. smb.conf .
• 2. .
• 3. .
• 4. .
• 5. .
• 6. Samba .
, , , - . . . . !

Source: https://habr.com/ru/post/173127/


All Articles