Check if the PC is either NT or Win95

Thomas.Hansen.tmh./Copenhagen at manbw.dk Thomas.Hansen.tmh./Copenhagen at manbw.dk
Fri Jun 26 11:59:52 GMT 1998


     
        Hi Herb,

I found out that if you set debug level to 0, there lines are omitted:

Added interface ip=150.166.97.31 bcast=150.166.97.255 nmask=255.255.255.0
Server time is Thu Jun 25 08:15:55 1998 Timezone is UTC-7.0
Password: 
Domain=[ENGR] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0] security=user

Thanks for you help.


Thomas
______________________________ Reply Separator _________________________________
Subject: Re: Check if the PC is either NT or Win95
Author:  herb (herb at chomps.engr.sgi.com) at internet
Date:    25-06-98 18:15


Thomas.Hansen.tmh./Copenhagen at manbw.dk wrote:
> root at hpcs7:/home/root #smbclient -L sv1a -U addcomp -W DIESEL -P 12345678 
> unrecognized character set
> Unable to copy service - source not found: 
> Password:
> 
> Server=[SV1A] User=[] Workgroup=[DIESEL] Domain=[] 
> 
>         Sharename      Type      Comment 
>         ---------      ----      ------- 
>         A              Disk
>         ADMIN$         Disk      Remote Admin 
>         C              Disk
>         C$             Disk      Default share 
>         IPC$           IPC       Remote IPC
>         TEMP           Disk
> 
>         What version of samba are you running? 
>         Any idears?
> 
     
I am running 1.9.18p8 but this has worked on all the 1.9.18 versions 
at least and maybe 1.9.17 as well. Do you have the correct codepage 
installed on the samba machine? Earlier versions of samba had a very 
limited set of code pages that it recognized. Also check the character 
set parameter. Here is the code that generates the second message.
     
void interpret_character_set(char *str) 
{
    if (strequal (str, "iso8859-1")) {
        init_iso8859_1();
    } else if (strequal (str, "iso8859-2")) {
        init_iso8859_2();
    } else if (strequal (str, "iso8859-5")) {
        init_iso8859_5();
    } else if (strequal (str, "koi8-r")) {
        init_koi8_r();
    } else {
        DEBUG(0,("unrecognized character set\n"));
    }
}
     
     
Here is the section from the smb.conf.5 man page
     
character set (G)
  This allows a smbd to map incoming characters from a DOS 850 
  Code page to either a Western European (ISO8859-1) or Eastern 
  European (ISO8859-2) code page. Normally not set, meaning no 
  filename translation is done.
     
  Default
       character set =
  Example
       character set = iso8859-1
     
     
Here is what the output should look like on an NT machine
     
herb at chomps:/ > smbclient -L tigra -W engr -U herb 
Added interface ip=150.166.97.31 bcast=150.166.97.255 
nmask=255.255.255.0
Server time is Thu Jun 25 08:15:55 1998 
Timezone is UTC-7.0
Password: 
Domain=[ENGR] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0] 
security=user
     
Server=[TIGRA] User=[] Workgroup=[ENGR] Domain=[]
     
        Sharename      Type      Comment
        ---------      ----      -------
        ADMIN$         Disk      Remote Admin 
        C$             Disk      Default share 
        D$             Disk      Default share 
        E              Disk      ZIPDRIVE
        IPC$           IPC       Remote IPC
        Personal       Disk      
     
     
Here is the output from a Win98 machine
     
herb at chomps:/ > smbclient -L herbnt2 -W herbnt -U herb 
Added interface ip=150.166.97.31 bcast=150.166.97.255 
nmask=255.255.255.0
Server time is Thu Jun 25 09:07:04 1998 
Timezone is UTC-7.0
security=share
     
Server=[HERBNT2] User=[] Workgroup=[HERB-NT] Domain=[HERB-NT]
     
        Sharename      Type      Comment
        ---------      ----      -------
        C              Disk      
        CDROM          Disk      
        D              Disk      
        IPC$           IPC       Remote Inter Process Communication
     
     
By the way, the -P option is used to connect as a printer so you do 
not need it.
     
If you have the source installed on your machine and also have perl 5 
you may want to take a look at a script I have in packaging/SGI 
directory
called findsmb. This will list all machines that respond on a subnet 
(see the comments at the beginning for how to run).
     
-- 
====================================================================== 
Herb Lewis                                   Silicon Graphics 
Technical Marketing                          2011 N Shoreline Blvd 
Network Systems Division                     Mountain View, CA  94043  
herb at sgi.com                                 Tel: 650-933-2177
http://www.sgi.com                           Fax: 650-932-2177          
======================================================================



More information about the samba mailing list