Archive for August, 2007

Web space - The anonymous user assigned by NFS is typically

Monday, August 27th, 2007

The anonymous user assigned by NFS is typically the “nobody” user name with a UID and GID -2 (because -2 cannot be assigned to a file, UIDs and GIDs of 65534 are assigned when the “nobody” user owns a file). This prevents the ID from running into a valid user or group ID. Using anonuid or anongid, you can change the anonymous user or group, respectively. For example, anonuid=175 sets all anonymous users to UID 175 and anongid=300 sets the GID to 300. User mapping If the same users have login accounts for a set of computers (and they have the same IDs), NFS, by default, will map those IDs. This means that if the user named mike (UID 110) on maple has an account on pine (mike, UID 110), from either computer he could use his own remotely mounted files from the other computer. If a client user that is not set up on the server creates a file on the mounted NFS directory, the file is assigned to the remote client s UID and GID. (An ls -l on the server would show the UID of the owner.) You can identify a file that contains user mappings using the map_static option. Tip The exports man page describes the map_static option, which should let you create a file that contains new ID mappings. These mappings should let you remap client IDs into different IDs on the server. Exporting the shared file systems After you have added entries to your /etc/exports file, you can actually export the directories listed using the exportfs command. If you reboot your computer, the exportfs command is run automatically to export your directories. However, if you want to export them immediately, you can do so by running exportfs from the command line (as root). Tip It s a good idea to run the exportfs command after you change the exports file. If any errors are in the file, exportfs will identify those errors for you. Here s an example of the exportfs command: # /usr/sbin/exportfs -a -v exporting :/pub exporting :/home The -a option indicates that all directories listed in /etc/exports should be exported. The -v option says to print verbose output. In this example, the /pub and /home directories from the local server are now immediately available for mounting by client computers. Tip The /var/lib/nfs/xtab file lists all the options, including the default options, assigned to each of the exported directories. Running the exportfs command temporarily makes your exported NFS directories available. To have your NFS directories available on an ongoing basis (that is, every time your system reboots), you need to configure your nfs start-up scripts to run at boot time. This is described in the next section. Starting the nfs daemons For security purposes, the NFS service is probably turned off by default on your Red Hat Linux system. You can use the chkconfig command to turn on the NFS service so that your files are exported and the nfsd daemons are running when your system boots. There are two start-up scripts you want to turn on for the NFS service to work properly. The nfs service exports file systems (from /etc/exports) and starts the nfsd daemon that listens for service requests. The nfslock service starts the lockd daemon, which helps allow file locking to prevent multiple simultaneous use of critical files over the network.
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Link and access options in /etc/exports You don t (Web hosting ecommerce)

Sunday, August 26th, 2007

Link and access options in /etc/exports You don t have to just give away your files and directories when you export a directory with NFS. In the options part of each entry in /etc/exports, you can add options that allow or limit access based on user ID, subdirectory, and read/write permission. These options, which are passed to NFS, are as follows: ro Only allow the client to mount this exported file system read-only. The default is to mount the file system read/write. rw Explicitly ask that a shared directory be shared with read/write permissions. (If the client chooses, it can still mount the directory read-only.) noaccess All files and directories below the given directory are not accessible. This is how you would exclude selected subdirectories of a shared directory from being shared. The directory will still appear to the client that mounts the file system that includes this directory, but the client will not be able to view its contents. link_relative If absolute symbolic links are included in the shared file system (that is, ones that identify a full path), the full path is converted to a relative path. To do this, each part of the path is converted to two dots and a slash (../) to reach the root of the file system. Link_absolute Don t change any of the symbolic links (default). User mapping options in /etc/exports Besides options that define how permissions are handled generally, you can also use options to set the permissions that specific users have to NFS shared file systems. One method that simplifies this process is to have each user with multiple user accounts have the same user name and UID on each machine. This makes it easier to map users so that they have the same permission on a mounted file system as they do on files stored on their local hard disk. If that method is not convenient, user IDs can be mapped in many other ways. Here are some methods of setting user permissions and the /etc/exports option that you use for each method: root user Normally, the client s root user is mapped into the anonymous user ID. This prevents the root user from a client computer from being able to change all files and directories in the shared file system. If you want the client s root user to have root permission on the server, use the no_root_squash option. Tip There may be other administrative users, in addition to root, that you want to squash. I recommend squashing UIDs 0 99 as follows: squash_uids=0 99. Anonymous user/group By using anonymous user ID and group ID, you essentially create a user/group whose permissions will not allow access to files that belong to any users on the server (unless those users open permission to everyone). However, files created by the anonymous user/group will be available to anyone assigned as the anonymous user/group. To set all remote users to the anonymous user/group, use the all_squash option.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Web host forum - system (/). There are security implications of sharing

Sunday, August 26th, 2007

system (/). There are security implications of sharing the whole file system or sensitive parts of it (such as /etc). Security options that you can add to your /etc/exports file are described below. Tip The linuxconf command can be used to add exported directories to /etc/exports. Select Exported file systems (NFS) from the left column (under Config Networking Server tasks). Buttons on the page let you choose a few options that affect write privileges, root privileges, symbolic links, and security. (If you add an entry this way, check /etc/exports later to see what you have done.) The format of the /etc/exports file is: Directory Host(Options) # Comments Directory is the name of the directory that you want to share. Host indicates the host computer that the sharing of this directory is restricted to. Options can include a variety of options to define the security measures attached to the shared directory for the host. (You can repeat Host/Option pairs.) Comments are any optional comments you want to add (following the # sign). Hostnames in /etc/exports You can indicate in the/etc/exports file which host computers can have access to your shared directory in the following ways: Individual host You can enter one or more TCP/IP hostnames or IP Addresses. If the host is in your local domain, you can simply indicate the hostname. Otherwise, you can use the full host.domain format. These are valid ways of indicating individual host computers: maple maple.handsonhistory.com 10.0.0.11 IP network To allow access to all hosts from a particular network address, indicate a network number and its netmask, separated by a slash (/). These are valid ways of indicating network numbers: 10.0.0.0/255.0.0.0 172.16.0.0/255.255.0.0 192.168.18.0/255.255.255.0 TCP/IP domain Using wild cards, you can include all or some host computers from a particular domain level. Here are some valid uses of the asterisk and question mark wild cards: *.handsonhistory.com *craft.handsonhistory.com ???.handsonhistory.com The first example matches all hosts in the handsonhistory.com domain. The second example matches woodcraft, basketcraft, or any other hostnames ending in craft in the handsonhistory.com domain. The final example matches any three-letter hostnames in the domain. Note Using an asterisk doesn t match subdomains. For example, *.handsonhistory.com would not cause the hostname mallard.duck.handsonhistory.com to be included in the access list. NIS groups You can allow access to hosts contained in an NIS group. To indicate a NIS group, precede the group name with an at (@) sign (for example, @group).
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Note Many people (Web hosting account) use the term file system

Saturday, August 25th, 2007

Note Many people use the term file system rather loosely. A file system is usually a structure of files and directories that exists on a single device (such as a hard disk partition or CD-ROM). When I talk about the Linux file system, however, I am referring to the entire directory structure (which may include file systems from several disks or NFS resources), beginning from root (/) on a single computer. A shared directory in NFS may represent all or part of a computer’s file system, which can be attached (from the shared directory down the directory tree) to another computer’s file system. Sharing NFS file systems To share an NFS file system from your Red Hat Linux system, you need to export it. Exporting is done in Red Hat Linux by adding entries into the /etc/exports file. Each entry identifies the directory in your local file system that you want to share. The entry identifies the other computers that can share the resource (or opens it to all computers) and includes other options that reflect permissions associated with the directory. Remember that when you share a directory, you are sharing all files and subdirectories below that directory as well (by default). So, you need to be sure that you want to share everything in that directory structure. There are still ways to restrict access within that directory structure (those methods are described later). Configuring the /etc/exports file As root user, you can use any text editor to configure the /etc/exports file to indicate what directories to share. Here is an example of an /etc/exports file, including some entries that it could include: /cal *.ourdomain.com(rw) # Company events /pub (ro,insecure,all_squash) # Public dir /home maple(rw,squash uids=0-99) spruce(rw,squash uids=0-99) Here is what the entries in the /etc/exports file mean: /cal Represents a directory that contains information about events related to the company. It is made accessible to everyone with accounts to any computers in the company s domain (*.ourdomain.com). Users can write files to the directory as well as read them (indicated by the rw option). The comment (# Company events) simply serves as a reminder of what the directory contains. /pub Represents a public directory. It allows any computer and user to read files from the directory (indicated by the ro option), but not to write files. The insecure option lets any computer, even those that don t use a secure NFS port, to have access to the directory. The all_squash option causes all users (UIDs) and groups (GIDs) to be mapped to the anonymous user, giving them minimal permission to files and directories. /home This is where you enable a set of users to have the same /home directory on different computers. Say, for example, that you are sharing /home from a computer named oak. The computers named maple and spruce could each mount that directory on their own /home directory. If you gave all users the same user name/UIDs on all machines, you could have the same /home/user directory available for each user, regardless of which computer they logged in to. The uids=0 99 is used to exclude any administrative login from another computer from changing any files in the shared directory. Tip If you were sharing /home, but you didn t want to share a particular user s directory, you could exclude that user s home directory using the noaccess option, described later. Of course, you can share any directories that you choose (these were just examples), including the entire file
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Web hosting providers - Set up the network If a LAN

Saturday, August 25th, 2007

Set up the network If a LAN or other network connection is already connecting the computer on which you want to use NFS (using TCP/IP as the network transport), you already have the network you need. 2. On the server, choose what to share Decide which file systems on your Linux NFS server you want to be available to other computers. You can choose any point in the file system to make all files and directories below that point accessible to other computers. 3. On the server, set up security There are several different security features that you can use to suit the level of security with which you are comfortable. Mount-level security lets you restrict the computers that can mount a resource and, for those allowed to mount it, lets you specify whether it can be mounted read/write or read-only. With user-level security, you map users from the client systems to users on the NFS server. In this way, users can rely on standard Linux read/write/execute permissions, file ownership, and group permissions to access and protect files. 4. On the client, mount the file system Each client computer that is allowed access to the server s NFS shared file system can mount it anywhere the client chooses. For example, you may mount a file system from a computer called maple on the /mnt/maple directory in your local file system. After it is mounted, you can view the contents of that directory by typing ls /mnt/maple. Then you can use the cd command below the /mnt/maple mount point to see the files and directories it contains. Figure 18-1 illustrates a Linux file server using NFS to share (export) a file system and a client computer mounting the file system to make it available to its local users. Figure 18-1: NFS can make selected file systems available to other computers. In this example, a computer named oak makes its /apps/bin directory available to clients on the network (pine, maple, and spruce) by adding an entry to the /etc/exports file. The client computer (pine) sees that the resource is available, then mounts the resource on its local file system at the mount point /oak/apps. At this point, any files, directories, or subdirectories from /apps/bin on oak are available to users on pine (given proper permissions). Although it is often used as a file server (or other type of server), Red Hat Linux is a general-purpose operating system. So, any Red Hat Linux system can share file systems (export) as a server or use other computer s file systems (mount) as a client. Contrast this with dedicated file servers, such as NetWare, which can only share files with client computers (such as Windows workstations) and will never act as a client.
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Chapter 18: Setting Up a File (Best web hosting) Server Overview

Friday, August 24th, 2007

Chapter 18: Setting Up a File Server Overview When groups of people need to work together on projects, they usually need to share documents. Likewise, it can be efficient for groups of people on a computer network to share common applications and directories of information needed to do their jobs. A common way to centrally store and share files on a network is by setting up a file server. Red Hat Linux includes support for each of the most common file server protocols in use today. The Network File System (NFS) has always been the file-sharing protocol of choice for Linux and other UNIX systems. Networks with many Windows and OS/2 computers tend to use Samba (SMB protocol). Prior to Samba, NetWare was the most prominent file-server software used on local area networks (LANs). This chapter describes how to set up file servers and clients associated with NFS, Samba, and NetWare file servers. Goals of Setting Up a File Server By centralizing data and applications on a file server, you can accomplish several different goals: Centralized distribution You can add documents or applications to one location and make them accessible to any computer or user that is granted permission. In this way, you don t have to be responsible for placing necessary files on every computer. Security You can control who has access to the file server on one computer instead of distributing the information to every computer and trying to control it. Transparency Using protocols such as NFS, clients of your file server (Windows, Linux or UNIX systems) can connect your file systems to their local file systems as if your file systems existed locally. (In other words, no drive letters. Just change to the remote system s mount point and you are there.) Setting Up an NFS File Server in Red Hat Linux Instead of representing storage devices as drive letters (A, B, C, and so on), as they are in Microsoft operating systems, Red Hat Linux connects file systems from multiple hard disks, floppy disks, CD-ROMs, and other local devices invisibly to form a single Linux file system. The Network File System (NFS) facility lets you extend your Red Hat Linux file system in the same way, to connect file systems on other computers to your local directory structure as well. Cross-Reference See Chapter 10 for a description of how to mount local devices on your Linux file system. The same command (mount) is used to mount both local devices and NFS file systems. Creating an NFS file server is an easy way to share large amounts of data among the users and computers in an organization. An administrator of a Red Hat Linux system that is configured to share its file systems using NFS has several things to do to get NFS working: 1.
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

host computer (the NetBIOS name, which is probably (Web hosting domain names)

Friday, August 24th, 2007

host computer (the NetBIOS name, which is probably also your TCP/IP name) should appear on the screen or within a workgroup folder on the screen. Open the icon that represents your computer. The window that opens should show your shared printers and folders. If your computer s icon doesn t appear in Network Neighborhood, try using the Find: Computer window. From Windows 95, choose Start Find Computer. Type your computer s name into the Named box and click Find Now. If the Find window finds your computer, double-click it. A window displaying the shared printers and folders from your computer appears, as shown in Figure 17-2. Figure 17-2: Find and display your SMB printer from Find: Computer. After your shared printer appears in the window, the client can configure a pointer to that printer by opening (double-clicking) the printer icon. You should see a message telling you that you have to set up the printer before you can use it. Click Yes to proceed to configure the printer for local use. The Add Printer Wizard appears. Answer the questions on how you intend to use the printer, and add appropriate drivers. When you are done, the printer will appear in your printer window. It can now be selected as the printer for any application program in Windows 9x. Another way to configure an SMB printer from a Windows operating system is to go to Start Settings Printers. Open the Add Printer icon, and then select Network Printer from the first window. Open the Add Printer icon. Then, follow the instructions to add a printer from the network. Summary Sharing printers is an economical and efficient way to use your organization s printing resources. A centrally located printer can make it easier to maintain a printer, while still allowing everyone to get his or her printing jobs done. Printer configuration is done with the printconf-gui tool. Printers configured with that tool can be printed using the lpr command. A variety of filters make it possible to print to different kinds of printers, as well as to printers that are connected to computers on the network. Besides being able to set up your computer as a Red Hat Linux print server, you can also have your computer emulate a NetWare or an SMB (Windows 9x) print server. After your network is configured properly and a local printer is installed, sharing that printer over the network as a UNIX, NetWare, or SMB print server is not very complicated.
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

Web design templates - # slist Known NetWare File Servers Network Node

Thursday, August 23rd, 2007

# slist Known NetWare File Servers Network Node Address ———————————————————- PINE 7F000001 000000000001 In this example, the NetWare server name (of the NetWare server running on Linux) is called PINE. Your server name will be different. 3. Use the nprint command to print to your NetWare print server in Linux. Type the following commands: $ cd /usr/share/printconf/tests $ nprint -S PINE -U GUEST -q PSPRINT testpage.asc Logging into PINE as GUEST Password: In the previous example, the NetWare server name is PINE, the user name is GUEST, and the print queue name is PSPRINT. By default, the guest account has no password, so you can just press Enter at the Password prompt. Note You don’t need to change to the tests directory in the previous example. I did that because I know that directory contains several test print pages in different formats. The textpage.asc is a plain text file. You can also try printing testpage.ps (a PostScript file) or testpage-a4.ps (an A4 PostScript page). Configuring a shared Samba printer Your Red Hat Linux printers can be configured as shared SMB printers by using the Samba SWAT (Samba Web Administration Tool) program. To use SWAT, you need to have the Samba package installed and the swat service configured so that SWAT can be opened in your browser window. You also need a TCP/IP connection between you and the client computers that will use your printer. Cross-Reference Chapter 18 describes how to set up Samba and SWAT to be used in your browser. With SWAT configured, you can open that program by opening Netscape on your local computer and typing the following address in the location box: http://localhost:901/ From the main Samba SWAT screen, click the Printers icon. The Printer Parameters page appears. It is possible that your printers are already made available as shared SMB printers. Click the down arrow next to the Choose Printer box. You should see a list of available printers. Those printers from the pop-up list that have an asterisk preceding their name were automatically loaded as shared printers. To create a new SMB printer, type a name into the Create Printer box and click Create Printer. Then, fill in the information about the printer (the path, security options, printing options, browse options, and miscellaneous options). When you are done, click Commit Changes. To find out how you would set up an SMB printer from Linux, see the section Adding a Windows (SMB) printer earlier in this chapter. Chances are good that if you are configuring an SMB printer on your Red Hat Linux computer, you will want to share it with Windows clients. If SMB is set up properly on your computer, and the client computers can reach you over the network, finding and using your printer should be fairly straightforward. The first place a client computer should look for your shared SMB printer is in Network Neighborhood (or My Network Places, for Windows 2000). From the Windows 9x desktop, double-click the Network Neighborhood icon. (From Windows 2000, double-click the My Network Places icon.) The name of your
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Configuring Print Servers The printers that are connected

Thursday, August 23rd, 2007

Configuring Print Servers The printers that are connected to your Red Hat Linux system can be shared in different ways with other computers on your network. Not only can your computer act as a Linux print server, but it can also appear to other client computers as a NetWare or SMB print server. After a local printer is attached to your Red Hat Linux system, and your computer is connected to your local network, you can use the procedures in this section to share it with client computers using a Linux (UNIX), NetWare, or SMB interface. Configuring a shared Linux printer in lpd.perms After a local printer is added to your Red Hat Linux computer, making it available to other computers on your network is fairly easy. If a TCP/IP network connection exists between the computers sharing the printer, then you simply have to grant permission to individual hosts or users from remote hosts to access your computer s printing service. The procedures for setting up local printers are discussed earlier in this chapter. The permissions that users from other computers have to your Red Hat Linux printer are determined based on the values in your /etc/lpd.perms file. By default, you should be able to print from other Linux computers on your network to your shared printer. You can modify your lpd.perms file if you want to restrict access to your printer. Configuring a shared NetWare printer NetWare server functions delivered with Red Hat Linux are offered using the mars_nwe package. This package enables you to do file and printer sharing from Red Hat Linux as though the resources being shared were coming from a NetWare server. Although not all NetWare features are offered, the mars_nwe package does well with basic NetWare file and printer sharing. Cross-Reference See Chapter 18 for information on setting up the mars_nwe package to share NetWare resources. The mars_nwe service must be running to share your printer as a NetWare print server. You can make your Red Hat Linux printers available as NetWare printers by adding entries to the /etc/nwserv.conf file. This file is used for configuring most mars_nwe information. Of particular interest for adding printers is the Print Queues section (section 21). Red Hat Linux printers are identified as NetWare print queues by indicating each line as a section 21 entry. Here is an example: 21 PSPRINT SYS:/PRINT/PSPRINT lpr -Ppsprint The number 21 identifies the entry as a NetWare print queue. PSPRINT is the name of the queue. The queue directory is identified as SYS:/PRINT/PSPRINT. Note that the queue directory is different from the lpd spool directory. Finally, the last part of the entry is the lpr command line used to print documents submitted to this print queue. Assuming you have done your basic NetWare server configuration, as described in Chapter 18, use this procedure to check that you are able to print to the NetWare print server you just set up in Linux: 1. Restart the mars_nwe service to incorporate the changes you just made to nwserv.conf by typing the following: # /etc/init.d/mars-nwe stop # /etc/init.d/mars-nwe start 2. Type the slist command to make sure that the NetWare server you configured is available:
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

To remove an individual print job (Florida web design) from the

Wednesday, August 22nd, 2007

To remove an individual print job from the queue, indicate the job number of that print job on the lprm command line. To first find out what the job number is, type the lpq command. Here s what the output of that command may look like: $ lpq Printer: lp@localhost Queue: 2 printable jobs Server: pid 4134 active Unspooler: pid 4135 active Status: waiting for subserver to exit at 18:54:05.230 Rank Owner/ID Class Job Files Size Time active root@localhost+133 A 133 /home/jake/pr1 467 18:53:49 2 root@localhost+197 A 197 /home/jake/mydoc 23948 18:54:05 The output shows two printable jobs waiting in the queue. (In this case, they’re not printing because the printer is off.) Under the Job column, you can see the job number associated with each document. To remove the first print job, type the following: # lprm 133 Controlling printers with lpc The lpc command enables you to check the status of printers, enable and disable printers, and change the arrangement of jobs in the queue. Any action you do with the lpc command can be done either to an individual printer (by indicating a printer name) or to all printers (by using the word all). To disable a specific printer (for example, one named canyonsps), use the disable option and type the following: $ lpc disable canyonsps Printer: canyonps@localhost kill server PID 4134 with User defined signal 1 canyonps@localhost.localdomain: disabled To enable a disabled printer (such as the one in the previous example), use the enable option and type the following: $ lpc enable canyonsps Printer: canyonps@localhost canyonps@localhost.localdomain: enabled When a printer is disabled, it can still continue to receive print jobs and hold them in the queue until the printer is enabled again. If you want to prevent jobs from being spooled at all, use the stop option as follows: $ lpc stop canyonsps Printer: canyonps@localhost canyonps@localhost.localdomain: stopped To start the printing daemon again and resume printing, use the start option, as follows: $ lpc start canyonsps Printer: canyonps@localhost canyonps@localhost.localdomain: started To disable a printer and kill the lpd printing daemon (so that no further jobs can be printed), use the abort option, as follows: $ lpc abort canyonsps Printer: canyonps@localhost kill server PID 4239 with Interrupt canyonps@localhost.localdomain: aborted job
You want to have a cheap webhost for your apache application, then check apache web hosting services.