[Samba] NT_STATUS code list ?

Andrew Bartlett abartlet at samba.org
Fri Feb 14 11:01:52 GMT 2003


On Fri, 2003-02-14 at 01:27, David Morel wrote:
> Hi,
> 
> I'm trying to automate a server connection to various shares on my network (so 
> as to back them up). I use smbmount which works fine, except on one machine 
> running winXp:
> 
> i shared a directory on that machine, using a locally created windows user 
> with read-only rights as the only one allowed to access this share. When i 
> tried to mount it (kernel 2.4.20) with smbfs, smbmount hanged, and there was 
> no way i could unmount the share, so i had to reboot.

Sounds nasty - you might want to try and get the smbfs maintainer's
attention, or try the new CIFS VFS.

> In fact, the username and pass i used were wrong, i realized that when i used 
> smbclient on that share and double-checked my setup. The strange thing is i 
> could do a smbclient //machine/share -c ls even with the wrong username and 
> password, the answer being 'NT_STATUS_ACCESS_DENIED listing \*'. It gave me 
> an answer about smbfs sending all these (approx. from memory) 
> 'smb_proc_readdir_long read=\* err=5'. So i know now where the trouble is.
> The funny thing is that the xp machine even when denying access still prints 
> the disk free space :-)

Yes, Win2k allows you to connect to a share you don't have the right to
read the files in - you just cannot perform any operations on it...

Interesting point on the free space however :-)

> What i want to do know is prior to mounting the shares, try to smbclient them, 
> and depending on the answer decide to mount the share or not. The range of 
> answers i got so far was NT_STATUS_UNSUCCESSFUL, NT_STATUS_LOGON_FAILURE and 
> NT_STATUS_WRONG_PASSWORD; all of which are reasons for me not to mount the 
> given share. I would like to know what other messages of the same kind are 
> sent back by smbclient, so i can really put that automation stuff together.
> 
> I tried to browse the source code of course but... It is huge and i have very 
> little clue about it all.

Why would you attempt to mount the share if you had any error at all?

The full list is in include/nterr.h, but I don't think it will actually
help you.

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba/attachments/20030214/a05a8df3/attachment.bin


More information about the samba mailing list