Archive for August, 2007

Personal web server - First, a Samba server that is a local

Sunday, August 26th, 2007

First, a Samba server that is a local master browser can use the remoteannounce configuration option to make sure that computers in different subnets are sent broadcast announcements about the server. This has the effect of ensuring that the Samba server appears in the browse lists of foreign subnets. To achieve this, however, the directed broadcasts must reach the local master browser on the other subnet. Be aware that many routers do not allow directed broadcasts by default; you may have to change this setting on the router for the directed broadcasts to get through to its subnet. With the remoteannounceoption, list the subnets and the workgroup that should receive the broadcast. For example, to ensure that machines in the 192.168.221 and 192.168.222 subnets and SIMPLE workgroup are sent broadcast information from our Samba server, we could specify the following: # Browsing election options os level = 34 local master = yes remote announce = 192.168.221.255/SIMPLE \ 192.168.222.255/SIMPLE In addition, you are allowed to specify the exact address to send broadcasts to if the local master browser on the foreign subnet is guaranteed to always have a fixed IP address. A Samba local master browser can synchronize its browse list directly with another Samba server acting as a local master browser on a different subnet. For example, let s assume that Samba is configured as a local master browser, and Samba local master browsers exist at 192.168.221.130 and 192.168.222.120. We can use the remotebrowsesyncoption to sync directly with the Samba servers, as follows: # Browsing election options os level = 34 local master = yes remote browse sync = 192.168.221.130 192.168.222.120 142
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Samba can assume the (Web site traffic) role of a domain

Sunday, August 26th, 2007

Samba can assume the role of a domain master browser for all subnets in the workgroup with the following option: domain master = yes You can verify that a Samba machine is in fact the domain master browser by checking the nmbd log file: nmbd/nmbd_become_dmb.c:become_domain_master_stage2(118) ***** Samba name server HYDRA is now a domain master browser for workgroup SIMPLE on subnet 192.168.220.100 ***** Or you can use the nmblookupcommand that comes with the Samba distribution to query for a unique <1B> resource type in the workgroup: # nmblookup SIMPLE#1B Sending queries to 192.168.220.255 192.168.220.100 SIMPLE<1b> 5.1.4.1 Multiple subnets There are three rules that you must remember when creating a workgroup/domain that spans more than one subnet: You must have either a Windows NT or Samba machine acting as a local master browser on each subnet in the workgroup/domain. (If you have a domain master browser in a subnet, a local master browser is not needed.) You must have a Windows NT Server or a Samba machine acting as a domain master browser somewhere in the workgroup. Each local master browser must be instructed to synchronize with the domain master browser. Samba has a few other features in this arena in the event that you don t have or want a domain master browser on your network. Consider the subnets shown in Figure 5.1. Figure 5.1: Multiple subnets with Samba servers 141
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

SIMPLE UNIQUE Registered SIMPLE GROUP Registered MAC Address

Saturday, August 25th, 2007

SIMPLE <1D> UNIQUE Registered SIMPLE <1E> GROUP Registered MAC Address = 00-00-00-00-00-00 The resource entry that you re looking for is the ..__MSBROWSE__.<01>. This indicates that the server is currently acting as the local master browser for the current subnet. In addition, if the machine is a Samba server, you can check the Samba nmbd log file for an entry such as: nmbd/nmbd_become_lmb.c:become_local_master_stage2(406) ***** Samba name server HYDRA is now a local master browser for workgroup SIMPLE on subnet 192.168.220.100 **** Finally, Windows NT servers serving as primary domain controllers contain a sneak that allows them to assume the role of the local master browser in certain conditions; this is called the preferred master browser bit. Earlier, we mentioned that Samba could set this bit on itself as well. You can enable it with the preferredmasteroption: # Browsing election options os level = 33 local master = yes preferred master = yes If the preferred master bit is set, the machine will force a browsing election at startup. Of course, this is needed only if you set the osleveloption to match the Windows NT machine. We recommend that you don t use this option if another machine also has the role of preferred master, such as an NT server. 5.1.4 Domain Master Browser In the opening chapter, we mentioned that in order for a Windows workgroup or domain to extend into multiple subnets, one machine would have to take the role of the domain master browser. The domain master browser propagates browse lists across each of the subnets in the workgroup. This works because each local master browser periodically synchronizes its browse list with the domain master browser. During this synchronization, the local master browser passes on any server that the domain master browser does not have in its browse list, and vice versa. In a perfect world, each local master browser would eventually have the browse list for the entire domain. Unlike the local master browser, there is no election to determine which machine assumes the role of the domain master browser. Instead, the administrator has to set it manually. By Microsoft design, however, the domain master browser and the primary domain controller (PDC) both register a resource type of <1B>, so the roles - and the machines - are inseparable. If you have a Windows NT server on the network acting as a PDC, we recommend that you do not use Samba to become the domain master browser. The reverse is true as well: if Samba is taking on the responsibilities of a PDC, we recommend making it the domain master browser as well. Although it is possible to split the roles with Samba, this is not a good idea. Using two different machines to serve as the PDC and the domain master browser can cause random errors to occur on a Windows workgroup. 140
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.

Submit web site - Elections are decided in the following order: 1.

Saturday, August 25th, 2007

Elections are decided in the following order: 1. The machine with the highest version of the election protocol will win. (So far, this is meaningless, as all Windows clients have version 1 of the election protocol.) 2. The machine with the highest operating system value wins the election. 3. If there is a tie, the machine with the setting of Preferred Master Browser (role 8) wins the election. 4. If there is still a tie, the client who has been online the longest wins the election. 5. And finally, if there is still a tie, the client name that comes first alphabetically wins. 6. The machine that is the “runner-up” can become a backup browser. As a result, if you want Samba to take the role of a local master browser, but only if there isn t a Windows NT Server (4.0 or 3.51) on the network, you could change the oslevelparameter in the previous example to: os level = 31 This will cause Samba to immediately lose the election to a Windows NT 4.0 or Windows NT 3.5 Server, both of which have a higher operating systems level. On the other hand, if you wanted to decide the local master browser on the basis of the network role, such as which machine is the primary domain controller, you could set the oslevelto match the highest type of operating system on the network and let the election protocol fall down to the next level. How can you can tell if a machine is a local master browser? By using the nbtstatcommand. Place the NetBIOS name of the machine you wish to check after the -aoption: C:\> nbtstat -a hydra NetBIOS Remote Machine Name Table Name Type Status HYDRA <00> UNIQUE Registered HYDRA <03> UNIQUE Registered HYDRA <20> UNIQUE Registered ..__MSBROWSE__. <01> GROUP Registered SIMPLE <00> GROUP Registered 139
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

Yahoo web hosting - The version of the election protocol used The

Saturday, August 25th, 2007

The version of the election protocol used The operating system on the machine The amount of time the client has been on the network The hostname of the client Here is how the election is decided. Operating systems are assigned a binary value according to their version, as shown in Table 5.1. Table 5.1: Operating System Values in an Election Operating System Value Windows NT Server 4.0 33 Windows NT Server 3.51 32 Windows NT Workstation 4.0 17 Windows NT Workstation 3.51 16 Windows 98 2 Windows 95 1 Windows 3.1 for Workgroups 1 Following that, each computer on the network is assigned a separate value according to its role, as shown in Table 5.2. Table 5.2: Computer Role Settings in an Election Role Value Primary Domain Controller 128 WINS Client 32 Preferred Master Browser 8 Active Master Browser 4 Standby Browser 2 Active Backup Browser 1 138
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

Note that we used the %Svariable in the (Cpanel web hosting)

Friday, August 24th, 2007

Note that we used the %Svariable in the pathoption. If you use the %Svariable, it will refer to the requested nonexistent share (the original share requested by the user), not the name of the resulting default share. This allows us to create different paths with the names of each server, which can provide more customized help files for users. In addition, any underscores (_) specified in the requested share will be converted to slashes (/) when the %S variable is used. 5.1.3 Browsing Elections As mentioned in Chapter 1, Learning the Samba, one machine in each subnet always keeps a list of the currently active machines. This list is called the browse list and the server that maintains it is called the local master browser. As machines come on and off the network, the local master browser continually updates the information in the browse list and provides it to any machine that requests it. A computer becomes a local master browser by holding a browsing election on the local subnet. Browsing elections can be called at any time. Samba can rig a browsing election for a variety of outcomes, including always becoming the local master browser of the subnet or never becoming it. For example, the following options, which we ve added to the configuration file from Chapter 4, Disk Shares, will ensure that Samba always wins the election for local master browser no matter which machines are also present: [global] netbios name = HYDRA server string = Samba %v on (%L) workgroup = SIMPLE # Browsing election options os level = 34 local master = yes # Networking configuration options hosts allow = 192.168.220. 134.213.233. localhost hosts deny = 192.168.220.102 interfaces = 192.168.220.100/255.255.255.0 \ 134.213.233.110/255.255.255.0 # Debug logging information log level = 2 log file = /var/log/samba.log.%m max log size = 50 debug timestamp = yes [data] path = /home/samba/data browseable = yes guest ok = yes comment = Data Drive volume = Sample-Data-Drive writable = yes However, what if we didn t always want to win the election? What if we wanted to yield browsing to a Windows NT Server if present? In order to do that, we need to learn how browsing elections work. As you already know, each machine that takes place in the election must broadcast information about itself. This information includes the following: 137
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.

5.1.1 Preventing Browsing (Web site counters) You can restrict a share

Friday, August 24th, 2007

5.1.1 Preventing Browsing You can restrict a share from being in a browse list by using the browseableoption. This boolean option prevents a share from being seen in the Network Neighborhood at all. For example, to prevent the [data]share from the previous chapter from being visible, we could write: [data] path = /home/samba/data browseable = no guest ok = yes comment = Data Drive volume = Sample-Data-Drive writeable = yes Although you typically don t want to do this to an ordinary disk share, the browseable option is useful in the event that you need to create a share with contents that you do not want others to see, such as a [netlogin]share for storing logon scripts for Windows domain control (see Chapter 6, Users, Security, and Domains for more information on logon scripts). Another example is the [homes]share. This share is often marked non-browsable so that a share named [homes]won t appear when its machine s resources are browsed. However, if a user alicelogs on and looks at the machine s shares, an [alice]share will appear under the machine. What if we wanted to make sure alice s share appeared to everyone before she logs in? This could be done with the global autoservicesoption. This option preloads shares into the browse list to ensure that they are always visible: [global] … auto services = alice … 5.1.2 Default Services In the event that a user cannot successfully connect to a share, you can specify a default share to which they can connect. Since you do not know who will default to this share at any time, you will probably want to set the guestokoption to yesfor this share. Specifying a default servicecan be useful when sending the utterly befuddled to a directory of help files. For example: [global] … default service = helpshare … [helpshare] path = /home/samba/helpshare/%S browseable = yes guest ok = yes comment = Default Share for Unsuccessful Connections volume = Sample-Data-Drive writeable = no 136
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Using Samba Robert Eckstein, David Collier-Brown, Peter Kelly (Database web hosting)

Thursday, August 23rd, 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 5 5. Browsing and Advanced Disk Shares Contents: Browsing Filesystem Differences File Permissions and Attributes on MS-DOS and Unix Name Mangling and Case Locks and Oplocks This chapter continues our discussion of disk shares from the previous chapter. Here, we will discuss various differences between the Windows and Unix filesystems - and how Samba works to bridge the gap. There are a surprising number of inconsistencies between a DOS filesystem and a Unix filesystem. In addition, we will talk briefly about name mangling, file locking, and a relatively new feature for Samba: opportunistic locking, or oplocks. However, before we move into that territory, we should first discuss the somewhat arcane topic of browsing with Samba. 5.1 Browsing Browsing is the ability to examine the servers and shares that are currently available on your network. On a Windows NT 4.0 or 95/98 client, a user can browse network servers through the Network Neighborhood folder. By double-clicking the icon representing the server, the user should be able to see the printer and disk share resources available on that machine as well. (If you have Windows NT 3.x, you can use the Disk-Connect Network Drive menu in the File Manager to display the available shares on a server.) From the Windows command line, you can also use the netviewoption to see which servers are currently on the network. Here is an example of the netview command in action: C:\> net view Servers available in workgroup SIMPLE Server name Remark \\CHIMAERA Windows NT 4.0 \\HYDRA Samba 2.0.4 on (hydra) \\PHOENIX Windows 98 135
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

[global] log level = 3 syslog = 1 (Web site optimization)

Thursday, August 23rd, 2007

[global] log level = 3 syslog = 1 With this, all logging information with a level of 0 would be sent to the standard Samba logs and the system logger, while information with levels 1, 2, and 3 would be sent only to the standard Samba logs. Levels above 3 are not logged at all. Note that all messages sent to the system logger are mapped to a priority level that the syslog process understands, as shown in Table 4.8. The default level is 1. Table 4.8: Syslog Priority Conversion Log Level Syslog Priority 0 LOG_ERR 1 LOG_WARNING 2 LOG_NOTICE 3 LOG_INFO 4 and above LOG_DEBUG If you wish to use syslog, you will have to run configure–with-syslogwhen compiling Samba, and you will need to configure your /etc/syslog.conf to suit. (See the section Section 4.8.1, Using syslog, earlier in this chapter.) 4.8.2.6 syslog only The syslogonlyoption tells Samba not to use the regular logging files - the system logger only. To enable this, specify the following option in the global ection of the Samba configuration file: [global] syslog only = yes 4.7 Virtual Servers 5. Browsing and Advanced Disk Shares O Reilly Home | O Reilly Bookstores | How to Order | O Reilly Contacts International | About O Reilly | Affiliated Companies 1999, O Reilly & Associates, Inc. 134
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Web design service - 4.8.2.2 log level The logleveloption sets the amount

Wednesday, August 22nd, 2007

4.8.2.2 log level The logleveloption sets the amount of data to be logged. Normally this is left at 0 or 1. However, if you have a specific problem you may want to set it at 3, which provides the most useful debugging information you would need to track down a problem. Levels above 3 provide information that s primarily for the developers to use for chasing internal bugs, and slows down the server considerably. Therefore, we recommend that you avoid setting this option to anything above 3. [global] log file = /usr/local/logs/samba.log.%m log level = 3 4.8.2.3 max log size The maxlogsizeoption sets the maximum size, in kilobytes, of the debugging log file that Samba keeps. When the log file exceeds this size, the current log file is renamed to add an .old extension (erasing any previous file with that name) and a new debugging log file is started with the original name. For example: [global] log file = /usr/local/logs/samba.log.%m max log size = 1000 Here, if the size of any log file exceeds one megabyte in size, Samba renames the log file samba.log. machine-name.old and a new log file is generated. If there was a file there previously with the .old extension, Samba deletes it. We highly recommend setting this option in your configuration files because debug logging (even at lower levels) can covertly eat away at your available disk space. Using this option protects unwary administrators from suddenly discovering that most of their disk space has been swallowed up by a single Samba log file. 4.8.2.4 debug timestamp or timestamp logs If you happen to be debugging a network problem and you find that the date-stamp and timestamp information within the Samba log lines gets in the way, you can turn it off by giving either the timestamplogsor the debugtimestampoption (they re synonymous) a value of no. For example, a regular Samba log file presents its output in the following form: 12/31/98 12:03:34 hydra (192.168.220.101) connect to server network as user davecb With a no value for this option, the output would appear without the datestamp or the timestamp: hydra (192.168.220.101) connect to server network as user davecb 4.8.2.5 syslog The syslogoption causes Samba log messages to be sent to the Unix system logger. The type of log information to be sent is specified as the parameter for this argument. Like the log leveloption, it can be a number from 0 to 10. Logging information with a level less than the number specified will be sent to the system logger. However, debug logs equal to or above the sysloglevel, but less than log level, will still be sent to the standard Samba log files. To get around this, use the syslogonly option. For example: 133
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.