Simple Samba question

Urban Widmark urban at teststation.com
Tue Feb 20 17:44:50 GMT 2001


On Tue, 20 Feb 2001, Rajat Goon wrote:

> Hi All,
>    I'm using R'Hat 6.2. My Samba setup is the simplest. Just I am
> using  the first step from smb-howto. I am trying to share /home/guset
> in linux box and try to access windows drive from linux box. It looks
> like both are working fine, But whenever I am using smbclient/smbmount
> to check, it is always giving the problem "session request <hostname>
> failed" . Though everything is working fine. Can anyone tell me, what
> I am missing ?  Although if I ignore this message I am getting what I
> want but that error message is bothering me.

It's a harmless message if the mount works. You get it because you are
giving the wrong netbios name for the server (or something).


The smbmount code looks like this. It first tries a "cli_session_request",
if it fails it prints the message and tries again with the special
"*SMBSERVER" name.

again:
...
        if (!cli_session_request(c, &calling, &called)) {
                fprintf(stderr, "session request to %s failed\n", called.name);
                cli_shutdown(c);
                if (strcmp(called.name, "*SMBSERVER")) {
                        make_nmb_name(&called , "*SMBSERVER", 0x20);
                        goto again;
                }
                return NULL;
        }

It might be better to not print it as an error, but to print it as a debug
message and only print the error if all attempts fail (smbclient tries 3 
different names).

/Urban





More information about the samba mailing list