the IP address of the name located will be reported. If you use the workgroup name "-" then nmbd will search for a master browser for any workgroup by using the name __MSBROWSE__. This option is meant to be used interactively on the command line, not as a daemon or in inetd. .RE .B -L .I netbios name .RS 3 If this parameter is given, the server will look up the specified .I netbios name, report success or failure, then exit. If successful, the IP address of the name located will be reported. This is useful for determining whether a netbios name is in use on a subnet and for matching IP addresses to netbios names. This option is meant to be used interactively on the command line, not as a daemon or in inetd. Use of this parameter causes options .B -D , .B -P , .B -R and .B -n to be ignored. By default, the server will NOT do this. .RE .B -N .RS 3 On some systems, the server is unable to determine the netmask. If your system has this difficulty, this parameter may be used to specify an appropriate netmask. The mask should be given in standard "a.b.c.d" notation. Only use this parameter if you are sure that the server cannot properly determine the proper netmask. The default netmask is determined by the server at run time. If it encounters difficulty doing so, it makes a guess based on the local IP number. .RE .B -P .RS 3 If specified, this parameter causes the server to operate passively. That is, it continues to field requests, but will not respond. By default, the server will NOT operate passively. .RE .B -S .RS 3 If specified, this parameter causes the server to respond to broadcast name queries for hosts that can be found with the gethostbyname() call (which normally goes to NIS or DNS). It will NOT respond if the host being queried is on the same subnet as the server. This is useful so clients can connect to servers to which they cannot broadcast. By default, the server will NOT respond to any broadcast queries other than it's own name. .RE .B -d .I debuglevel .RS 3 debuglevel is an integer from 0 to 5. The default value if this parameter is not specified is zero. The higher this value, the more detail will be logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for day to day running - it generates a small amount of information about operations carried out. Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic. .RE .B -l .I log file .RS 3 If specified, .I logfile specifies a base filename into which operational data from the running server will be logged. The default base name is specified at compile time. The base name is used to generate actual log file names. For example, if the name specified was "log", the following files would be used for log data: .RS 3 log.nmb (containing debugging information) log.nmb.in (containing inbound transaction data) log.nmb.out (containing outbound transaction data) .RE The log files generated are never removed by the server. .RE .RE .B -n .I netbios name .RS 3 This parameter tells the server what netbios name to respond with when queried. The same name is also registered on startup unless the -R parameter was specified. The default netbios name used if this parameter is not specified is the name of the host on which the server is running. .RE .B -O .I socket options .RS 3 See the socket options section of smb.conf(5) for details .RE .B -p .I port number .RS 3 port number is a positive integer value. The default value if this parameter is not specified is 137. This number is the port number that will be used when making connections to the server from client software. The standard (well-known) port number for the server is 137, hence the default. If you wish to run the server as an ordinary user rather than as root, most systems will require you to use a port number greater than 1024 - ask your system administrator for help if you are in this situation. Note that the name server uses UDP, not TCP! This parameter is not normally specified except in the above situation. .RE .B -T .I browse interval .RS 3 This sets the number of seconds between browse announcements. It defaults to 60 seconds. The minimum value is 10 seconds. .SH FILES .B /etc/inetd.conf .RS 3 If the server is to be run by the inetd meta-daemon, this file must contain suitable startup information for the meta-daemon. See the section "INSTALLATION" below. .RE .B /etc/rc.d/rc.inet2 .RS 3 (or whatever initialisation script your system uses) If running the server as a daemon at startup, this file will need to contain an appropriate startup sequence for the server. See the section "Installation" below. .RE .B /etc/services .RS 3 If running the server via the meta-daemon inetd, this file must contain a mapping of service name (eg., netbios-ns) to service port (eg., 137) and protocol type (eg., udp). See the section "INSTALLATION" below. .RE .RE .SH ENVIRONMENT VARIABLES Not applicable. .SH INSTALLATION The location of the server and its support files is a matter for individual system administrators. The following are thus suggestions only. It is recommended that the server software be installed under the /usr/local hierarchy, in a directory readable by all, writeable only by root. The server program itself should be executable by all, as users may wish to run the server themselves (in which case it will of course run with their privileges). The server should NOT be setuid or setgid! The server log files should be put in a directory readable and writable only by root, as the log files may contain sensitive information. The remaining notes will assume the following: .RS 3 nmbd (the server program) installed in /usr/local/smb log files stored in /var/adm/smblogs .RE The server may be run either as a daemon by users or at startup, or it may be run from a meta-daemon such as inetd upon request. If run as a daemon, the server will always be ready, so starting sessions will be faster. If run from a meta-daemon some memory will be saved and utilities such as the tcpd TCP-wrapper may be used for extra security. When you've decided, continue with either "Running the server as a daemon" or "Running the server on request". .SH RUNNING THE SERVER AS A DAEMON To run the server as a daemon from the command line, simply put the "-D" option on the command line. There is no need to place an ampersand at the end of the command line - the "-D" option causes the server to detach itself from the tty anyway. Any user can run the server as a daemon (execute permissions permitting, of course). This is useful for testing purposes. To ensure that the server is run as a daemon whenever the machine is started, you will need to modify the system startup files. Wherever appropriate (for example, in /etc/rc.d/rc.inet2), insert the following line, substituting values appropriate to your system: .RS 3 /usr/local/smb/nmbd -D -l/var/adm/smblogs/log .RE (The above should appear in your initialisation script as a single line. Depending on your terminal characteristics, it may not appear that way in this man page. If the above appears as more than one line, please treat any newlines or indentation as a single space or TAB character.) If the options used at compile time are appropriate for your system, all parameters except the desired debug level and "-D" may be omitted. See the section on "Options" above. .SH RUNNING THE SERVER ON REQUEST If your system uses a meta-daemon such as inetd, you can arrange to have the SMB name server started whenever a process attempts to connect to it. This requires several changes to the startup files on the host machine. If you are experimenting as an ordinary user rather than as root, you will need the assistance of your system administrator to modify the system files. First, ensure that a port is configured in the file /etc/services. The well-known port 137 should be used if possible, though any port may be used. Ensure that a line similar to the following is in /etc/services: .RS 3 netbios-ns 137/udp .RE Note for NIS/YP users: You may need to rebuild the NIS service maps rather than alter your local /etc/services file. Next, put a suitable line in the file /etc/inetd.conf (in the unlikely event that you are using a meta-daemon other than inetd, you are on your own). Note that the first item in this line matches the service name in /etc/services. Substitute appropriate values for your system in this line (see .B inetd(8)): .RS 3 netbios-ns dgram udp wait root /usr/local/smb/nmbd -l/var/adm/smblogs/log .RE (The above should appear in /etc/inetd.conf as a single line. Depending on your terminal characteristics, it may not appear that way in this man page. If the above appears as more than one line, please treat any newlines or indentation as a single space or TAB character.) Note that there is no need to specify a port number here, even if you are using a non-standard port number. .SH TESTING THE INSTALLATION If running the server as a daemon, execute it before proceeding. If using a meta-daemon, either restart the system or kill and restart the meta-daemon. Some versions of inetd will reread their configuration tables if they receive a HUP signal. To test whether the name server is running, start up a client .I on a different machine and see whether the desired name is now present. Alternatively, run the nameserver .I on a different machine specifying "-L netbiosname", where "netbiosname" is the name you have configured the test server to respond with. The command should respond with success, and the IP number of the machine using the specified netbios name. You may need the -B parameter on some systems. See the README file for more information on testing nmbd. .SH VERSION This man page is (mostly) correct for version 1.9.00 of the Samba suite, plus some of the recent patches to it. These notes will necessarily lag behind development of the software, so it is possible that your version of the server has extensions or parameter semantics that differ from or are not covered by this man page. Please notify these to the address below for rectification. .SH SEE ALSO .B inetd(8), .B smbd(8), .B smb.conf(5), .B smbclient(1), .B testparm(1), .B testprns(1) .SH DIAGNOSTICS [This section under construction] Most diagnostics issued by the server are logged in the specified log file. The log file name is specified at compile time, but may be overridden on the command line. The number and nature of diagnostics available depends on the debug level used by the server. If you have problems, set the debug level to 3 and peruse the log files. Most messages are reasonably self-explanatory. Unfortunately, at time of creation of this man page the source code is still too fluid to warrant describing each and every diagnostic. At this stage your best bet is still to grep the source code and inspect the conditions that gave rise to the diagnostics you are seeing. .SH BUGS None known. .SH CREDITS The original Samba software and related utilities were created by Andrew Tridgell (Andrew.Tridgell@anu.edu.au). Andrew is also the Keeper of the Source for this project. This man page written by Karl Auer (Karl.Auer@anu.edu.au) See .B smb.conf(5) for a full list of contributors and details on how to submit bug reports, comments etc. This describes how to use smbclient to connect to an OS/2 server. Knowing this allows you to use a OS/2 printer from unix. Author: riiber@oslonett.no How to login to an OS/2 server ------------------------------- Sample setup for OS/2 server running LanMan 2.2: OS/2 Server Name : \\OBV11 OS/2 User Account : ARNE OS/2 Password : xxx OS/2 shared service 1 : LASER02 OS/2 Shared service 2 : PCPROGS Samba NetBIOS name : KLATREMUS First, the two servers were started with the commands smbd and nmbd -n KLATREMUS. Command to connect to a the shared printer LASER02 on the OS/2 server: n smbclient '\\OBV11\LASER02' xxx -n ARNE -U ARNE -P and to connect to the shared drive 'PCPROGS': smbclient '\\OBV11\PCPROGS' xxx -n ARNE -U ARNE If login to the OS/2 server fails: ---------------------------------- The remarkable OS/2 server requires NetBIOS name to be equal to User name. This was the only combination of (NetBIOS name, User name) that allowed login. Password xxx must be in upper case, case in user name is unimportant. The OS/2 server responds with "Bad password - name/password pair" if the password is illegal (in lowercase, for example). If correct user name and password, but invalid NetBIOS name is given, it responds with "... SMBtcon failed. ERRDOS - 65". The OS/2 server can disable login fr