====== Ubuntu - Samba - Test Samba’s ability to authenticate users ====== ===== Test using an invalid username and password ===== smbclient //sharewiz/share -U user1%secret returns: Domain=[SHAREWIZ] OS=[Windows 6.1] Server=[Samba 4.3.9-Ubuntu] tree connect failed: NT_STATUS_ACCESS_DENIED ---- ===== Test using a valid username but with an incorrect password ===== smbclient //sharewiz/share -U validuser%incorrect_password returns: session setup failed: NT_STATUS_LOGON_FAILURE ---- ===== Test using a valid username with a valid password ===== smbclient //sharewiz/share -U validuser%correct_password returns: Domain=[SHAREWIZ] OS=[Windows 6.1] Server=[Samba 4.3.9-Ubuntu] smb: \> **NOTE:** If smbd is able to successfully authenticate the login name/password pair and that user is authorized to access the requested share, we are greeted with an **smb: \>** prompt. * If the user was correctly authenticated, but could not access the request service, smbclient reports that the **tree connect failed: ERRDOS - ERRnosuchshare**. * This is where an invalid sharename has been specified, which can be caused by a misspelled share name, permissions on the share which restrict the user in question from accessing that directory or printer, or a bad path statement in the share’s definition as given by smb.conf. ---- ===== Exit smb ===== smb: \> exit