Archive for July, 2007

Web servers - 3.3.6 Making Connection to a Resource For the

Tuesday, July 31st, 2007

3.3.6 Making Connection to a Resource For the final step, the server returns a TID to the client, indicating that the user has been authorized access and that the resource is ready to be used. It also sets the ServiceTypefield to “A” to indicate that this is a file service. Available service types are: “A” for a disk or file “LPT1″ for a spooled output “COMM” for a direct-connect printer or modem “IPC” for a named pipe The output is: >>> NBT Packet NBT Session Packet Flags=0×0 Length=78 SMB PACKET: SMBsesssetupX (REPLY) SMB Command = 0×73 Error class = 0×0 Error code = 0 Flags1 = 0×80 Flags2 = 0×1 Tree ID = 121 Proc ID = 5371 UID = 1 MID = 385 Word Count = 3 Com2=0×75 Off2=68 Action=0×1 [000] Unix Samba 1.9.1 [010] PARKSTR SMB PACKET: SMBtconX (REPLY) (CHAINED) smbvwv[]= Com2=0xFF Off2=78 smbbuf[]= ServiceType=A: Now that a TID has been assigned, the client may issue any sort of command that it would use on a local disk drive. It can open files, read and write to them, delete them, create new files, search for filenames, and so on. 97
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

3.3.5 Set Session and Login Parameters The next (Managed web hosting)

Tuesday, July 31st, 2007

3.3.5 Set Session and Login Parameters The next step is to transmit session and login parameters for the session. This includes the account name and password (if there is one), the workgroup name, the maximum size of data that can be transferred, and the number of pending requests that may be in the queue at any one time. In the following example, the Session Setup command presented allows for an additional SMB command to be piggybacked onto it. The letter X at the end of the command name indicates this, and the hexadecimal code of the second command is given in the Com2field. In this case the command is 0×75, which is the Tree Connect and X command. The SMBtconXmessage looks for the name of the resource in the smb_bufbuffer. (This is the last field listed in the following request.) In this example, smb_bufcontains the string \\ESCRIME\PUBLIC, which is the full pathname to a shared directory on node ESCRIME. Using the “and X” commands like this speeds up each transaction, since the server doesn t have to wait on the client to make a second request. Note that the TID is still zero. The server will provide a TID to the client once the session has been established and a connection has been made to the requested resource. In addition, note that the password is sent in the open. We can change this later using encrypted passwords: >>> NBT Packet NBT Session Packet Flags=0×0 Length=139 SMB PACKET: SMBsesssetupX (REQUEST) SMB Command = 0×73 Error class = 0×0 Error code = 0 Flags1 = 0×10 Flags2 = 0×0 Tree ID = 0 Proc ID = 5371 UID = 1 MID = 385 Word Count = 13 Com2=0×75 Res1=0×0 Off2=106 MaxBuffer=2920 MaxMpx=2 VcNumber=0 SessionKey=0×1FF2 CaseInsensitivePasswordLength=1 CaseSensitivePasswordLength=1 Res=0×0 Capabilities=0×1 Pass1&Pass2&Account&Domain&OS&LanMan= KRISTIN PARKSTR Windows 4.0 Windows 4.0 PassLen=2 Passwd&Path&Device= smb_bcc=22 smb_buf[]=\\ESCRIME\PUBLIC 96
We recommend high quality webhost to host and run your jsp application: christian web host services.

Web site optimization - 3.3.4 Negotiating the Protocol Variant At this point,

Tuesday, July 31st, 2007

3.3.4 Negotiating the Protocol Variant At this point, there is an open channel between the client and server. Next, the client sends a message to the server to negotiate an SMB protocol. As mentioned earlier, the client sets its tree identifier (TID) field to zero, since it does not yet know what TID to use. A tree identifier is a number that represents a connection to a share on a server. The command in the message is SMBnegprot, a request to negotiate a protocol variant that will be used for the entire session. Note that the client sends to the server a list of all of the variants that it can speak, not vice versa. The server responds to the SMBnegprotrequest with an index into the list of variants that the client offered, starting with index 0, or with the value 0xFF if none of the protocol variants are acceptable. Continuing this example, the server responds with the value 5, which indicates that the NTLM0.12 dialect will be used for the remainder of the session: >>> NBT Packet NBT Session Packet Flags=0×0 Length=154 SMB PACKET: SMBnegprot (REQUEST) SMB Command = 0×72 Error class = 0×0 Error code = 0 Flags1 = 0×0 Flags2 = 0×0 Tree ID = 0 Proc ID = 5371 UID = 0 MID = 385 Word Count = 0 Dialect=PC NETWORK PROGRAM 1.0 Dialect=MICROSOFT NETWORKS 3.0 Dialect=DOS LM1.2X002 Dialect=DOS LANMAN2.1 Dialect=Windows for Workgroups 3.1a Dialect=NT LM 0.12 >>> NBT Packet NBT Session Packet Flags=0×0 Length=69 SMB PACKET: SMBnegprot (REPLY) SMB Command = 0×72 Error class = 0×0 Error code = 0 Flags1 = 0×0 Flags2 = 0×1 Tree ID = 0 Proc ID = 5371 UID = 0 MID = 385 Word Count = 02 [000] 05 00 95
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

Web site design and hosting - 3.3.3 A Simple SMB Connection Before we close

Monday, July 30th, 2007

3.3.3 A Simple SMB Connection Before we close this chapter, let s take a look at a simple SMB connection. This is some pretty technical data - which isn t really necessary to administer Samba - so you can skip over it if you like. We present this information largely as a way to help you get familiar with how the SMB protocol negotiates connections with other computers on the network. There are four steps that the client and server must complete in order to establish a connection to a resource: 1. Establish a virtual connection. 2. Negotiate the protocol variant to speak. 3. Set session parameters. 4. Make a tree connection to a resource. We will examine each of these steps through the eyes of a useful tool that we mentioned earlier: the modified tcpdump that is available from the Samba web site. You can download this program at samba.org in the samba/ftp/tcpdump-smb directory; the latest version as of this writing is 3.4-5. Use this program as you would use the standard tcpdump application, but add the -s 1500switch to ensure that you get the whole packet and not just the first few bytes. 3.3.3.1 Establishing a virtual connection When a user first makes a request to access a network disk or send a print job to a remote printer, NetBIOS takes care of making a connection at the session layer. The result is a bidirectional virtual channel between the client and server. In reality, there are only two messages that the client and server need to establish this connection. This is shown in the following example session request and response, as captured by tcpdump : >>> NBT Packet NBT Session Request Flags=0×81000044 Destination=ESCRIME NameType=0×20 (Server) Source=WIZZIN NameType=0×00 (Workstation) >>> NBT Packet NBT Session Granted Flags=0×82000000 94
From our experience, we can recommend PHP5 Web Hosting services, if you need affordable webhost to host and run your web application.

Net web server - Samba implements the NTLM0.12specification for NT LAN Manager

Monday, July 30th, 2007

Samba implements the NTLM0.12specification for NT LAN Manager 1.0. It is backwards compatible with all of the other SMB variants. The CIFS specification is, in reality, LAN Manager 0.12 with a few specific additions. 3.3.2 SMB Clients and Servers As mentioned earlier, SMB is a client/server protocol. In the purest sense, this means that a client sends a request to a server, which acts on the request and returns a reply. However, the client/server roles can often be reversed, sometimes within the context of a single SMB session. For example, consider the two Windows 95/98 computers in Figure 3.28. The computer named WIZZIN shares a printer to the network, and the computer named ESCRIME shares a disk directory. WIZZIN is in the client role when accessing ESCRIME s network drive, and in the server role when printing a job for ESCRIME. Figure 3.28: Two computers that both have resources to share This brings out an important point in Samba terminology: A server is a machine with a resource to share. A client is a machine that wishes to use that resource. A server can be a client (of another computer s resource) at any given time. Note that there are no implications as to the amount of resources that make up a server, or whether it has a large disk space or fast processor. A server could be an old 486 with a printer attached to it, or it could be an UltraSparc station with a 10 gigabyte disk service. Microsoft Windows products have both the SMB client and server built in to the operating system. Wndows NT 4.0 uses a newer SMB protocol than Windows for Workgroups, and it offers an enhanced form of network security which will be discussed in Chapter 6. In addition, there are a large number of commercial SMB server products available from companies such as Sun, Compaq, SCO, Hewlett-Packard, Syntax, and IBM. Unfortunately, on the client side there are far fewer offerings, limited mainly to Digital Equipment s Pathworks product, and of course, Samba. 93
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Post office web site - the command segment are shown in Table 3.2.

Sunday, July 29th, 2007

the command segment are shown in Table 3.2. Table 3.2: SMB Command Contents Field Size in Bytes Description WCT 1 Word count VWV Variable Parameter words (size given by WCT) BCC 2 Parameter byte count DATA Variable Data (size given by BCC) Don t worry if you don t understand each of these fields; they are not necessary for using Samba at an administrator level. However, they do come in handy when debugging system messages. We will show you some of the more common SMB messages that clients and servers send using a modified version of tcpdump later in this section. (If you would like an SMB sniffer with a graphical interface, try “ethereal,” which uses the GTK libraries; see the Samba homepage for more information on this tool.) If you would like more information on each of the commands for the SMB protocol, see the SMB/CIFS documentation at ftp://ftp.microsoft.com/developr/drg/CIFS/. 3.3.1.3 SMB variations The SMB protocol has been extended with new commands several times since its inception. Each new version is backwards compatible with the previous versions. This makes it quite possible for a LAN to have various clients and servers running different versions of the SMB protocol at once. Table 3.3 outlines the major versions of the SMB protocol. Within each “dialect” of SMB are many sub-versions that include commands supporting particular releases of major operating systems. The ID string is used by clients and servers to determine what level of the protocol they will speak to each other. Table 3.3: SMB Protocol Dialects Protocol Name ID String Used By Core PC NETWORK PROGRAM 1.0 Core Plus MICROSOFT NETWORKS 1.03 LAN Manager 1.0 LANMAN1.0 LAN Manager 2.0 LM1.2X002 LAN Manager 2.1 LANMAN2.1 NT LAN Manager 1.0 NT LM 0.12 Windows NT 4.0 Samba s NT LM 0.12 Samba Samba Common Internet File System CIFS 1.0 Windows 2000 92
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Web host forum - 3.3.1 SMB Format Richard Sharpe of the Samba

Sunday, July 29th, 2007

3.3.1 SMB Format Richard Sharpe of the Samba team defines SMB as a “request-response” protocol.[4] In effect, this means that a client sends an SMB request to a server, and the server sends an SMB response back to the client. Rarely does a server send a message that is not in response to a client. [4] See http://anu.samba.org/cifs/docs/what-is-smb.html for Richard s excellent summary of SMB. An SMB message is not as complex as you might think. Let s take a closer look at the internal structure of such a message. It can be broken down into two parts: the header, which is a fixed size, and the command string, whose size can vary dramatically based on the contents of the message. 3.3.1.1 SMB header format Table 3.1 shows the format of an SMB header. SMB commands are not required to use all the fields in the SMB header. For example, when a client first attempts to connect to a server, it does not yet have a tree identifier (TID) value - one is assigned after it successfully connects - so a null TID (0xFFFF) is placed in its header field. Other fields may be padded with zeros when not used. The fields of the SMB header are listed in Table 3.1. Table 3.1: SMB Header Fields Field Size (bytes) Description 0xFF SMB 1 Protocol identifier COM 1 Command code, from 0×00 to 0xFF RCLS 1 Error class REH 1 Reserved ERR 2 Error code REB 1 Reserved RES 14 Reserved TID 2 Tree identifier; a unique ID for a resource in use by client PID 2 Caller process ID UID 2 User identifier MID 2 Multiplex identifier; used to route requests inside a process 3.3.1.2 SMB command format Immediately after the header is a variable number of bytes that constitute an SMB command or reply. Each command, such as Open File (COM field identifier: SMBopen) or Get Print Queue (SMBsplretq), has its own set of parameters and data. Like the SMB header fields, not all of the command fields need to be filled, depending on the specific command. For example, the Get Server Attributes (SMBdskattr) command sets the WCT and BCC fields to zero. The fields of 91
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Using Samba Robert Eckstein, David Collier-Brown, Peter Kelly (Submit web site)

Saturday, July 28th, 2007

Using Samba Robert Eckstein, David Collier-Brown, Peter Kelly 1st Edition November 1999 1-56592-449-5, Order Number: 4495 416 pages, $34.95 Buy the hardcopy Table of Contents Chapter 3 Configuring Windows Clients 3.3 An Introduction to SMB/CIFS We ll wrap up this chapter with a short tutorial on SMB/CIFS. SMB/CIFS is the protocol that Windows 95/98 and NT machines use to communicate with the Samba server and each other. At a high level, the SMB protocol suite is relatively simple. It includes commands for all of the file and print operations that you might do on a local disk or printer, such as: Opening and closing a file Creating and deleting files and directories Reading and writing a file Searching for files Queueing and dequeueing files to a print spool Each of these operations can be encoded into an SMB message and transmitted to and from a server. The original name SMB comes from their data format: these are versions of the standard DOS system-call data structures, or Server Message Blocks, redesigned for transmitting to another machine across a network. 90
Check Tomcat Web Hosting services for best quality webspace to host your web application.

If it works, congratulations! (Web server iis) Try writing to the

Saturday, July 28th, 2007

If it works, congratulations! Try writing to the server and sending data to the network printer. You will be pleasantly surprised how seamlessly everything works! Now that you ve finished setting up the Samba server and its clients, we can starting talking about how Samba works and how to configure it to your liking. 3.1 Setting Up Windows 95/98 Computers 3.3 An Introduction to SMB/CIFS O Reilly Home | O Reilly Bookstores | How to Order | O Reilly Contacts International | About O Reilly | Affiliated Companies 1999, O Reilly & Associates, Inc. 89
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Figure 3.26: Windows NT Network Neighborhood Double-clicking the (Cpanel web hosting)

Friday, July 27th, 2007

Figure 3.26: Windows NT Network Neighborhood Double-clicking the server name will show the resources that the server is offering to the network, as shown in Figure 3.27. In this case, the test and the default printer are offered to the Window NT workstation. For more information, see the warning under the “Accessing the Samba Server” section, earlier in this chapter. Figure 3.27: Server s shares WARNING: If you are presented with a dialog requesting the password for a user IPC$, then Samba did not accept the password that was sent from the client. In this case, the username and the password that were created on the client side must match the username/password combination on the Samba server. If you are using Windows 98 or Windows NT Service Pack 3 or above, this is probably because the client is sending encrypted passwords instead of plaintext passwords. You can remedy this situation by performing two steps on the Samba server. First, add the following entry to the [global] section of your Samba configuration file: encrypt password=yes. Second, find the smbpasswd program on the samba server (it is located in /usr/local/samba/bin by default) and use it to add an entry to Samba s encrypted password database. For example, to add user steveto Samba s encrypted password database, type smbpasswd -a steve. The first time you enter this password, the program will output an error message indicating that the password database does not exist; it will then create the database, which is typically stored in /usr/local/samba/private/smbpasswd. If you don t see the server listed, don t panic. Start the Windows NT Explorer (not Internet Explorer!) and select Map Network Drive from the Tools menu. A dialog box appears that allows you to type the name of your server and its share directory in Windows format. For example, you would enter \\server\temp if your server happened to be named “server.” If things still aren t right, go directly to the section “The Fault Tree” in Chapter 9, to see if you can troubleshoot what is wrong with the network. 88
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.