User Tools

Site Tools


samba:test_samba_s_ability_to_authenticate_users

This is an old revision of the document!


Samba - Test Samba’s ability to authenticate users

Test using an invalid username and password

smbclient //sharewiz/share -U user1%secret

Result:

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

Result:

session setup failed: NT_STATUS_LOGON_FAILURE

Test using a valid username with a valid password

smbclient //sharewiz/share -U validuser%correct_password

Result:

Domain=[SHAREWIZ] OS=[Windows 6.1] Server=[Samba 4.3.9-Ubuntu]
smb: \> 

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, by typing:

smb: \> exit
samba/test_samba_s_ability_to_authenticate_users.1468145508.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki