Lab Questions

 < Day Day Up > 



Lab 1: Configuring Samba

1. 

Part 1: Installing and Starting Samba

  1. Ensure that all four components of the Samba service are correctly installed. What RPMs did you install and how did you install them?

  2. Use one of the service management tools available to you to ensure that the Samba services are configured to start correctly when you boot Linux. What tool did you use?

  3. Start Samba services now. You can use either the service management script located directly in /etc/rc.d/init.d, or you can use the 'service' startup tool. How did you start your Samba service?

  4. Verify that Samba services are now running. How did you do this?

the first chapter lab on samba is designed to be easy to follow. however, you ll need explicit linux knowledge to complete some specific steps. answers to these steps can be found in the following:

2. 

Part 2: Configuring Samba's Global Settings

  1. You'll use Red Hat's Samba Server Configuration tool to configure your Samba service. Start this tool. If you didn't log in as the root user, did something happen before the tool started?

  2. Configure the Samba global settings. You will provide Workgroup services to your users. Set the Workgroup name to something appropriate for your company.

  3. Can you limit access to your company's domain name (such as example.com) through this tool? If you have to edit the Samba configuration file directly, what do you have to do?

  4. Can you prevent access to evil.cracker.com through this tool? If you have to edit the Samba configuration file directly, what do you have to do?

  5. Commit your changes. What do you need to do to make Samba reread the configuration file?

 step 1: you ve installed the windows file manager package group, which includes the samba-client, samba, and redhat-config-samba rpms. these rpms depend on the samba-common rpm, which you ll also need to install. step 2: you can use the chkconfig --level 35 smb on command or the service configuration utility described in chapter 4 to make sure samba starts the next time you boot linux. step 3: use the service smb start command to begin the samba service. step 4: one way to verify samba is to look for the existence of the smbd and nmbd processes in the process table. use ps aux | grep mbd to see if these processes are present. another way is with a service command such as service smb status .

3. 

Part 3: Configuring File Shares

  1. Open the main Samba configuration file.

  2. Navigate to the predefined [homes] share.

  3. Ensure that the [homes] share is available only to hosts on your example.com network.

  4. Ensure that the share is writable to authenticated users but not available to guest users.

  5. Commit your changes.

  6. Create a new share called [public].

  7. Change the path to the public share to /home/public.

  8. Configure the public share so anyone in your domain can access the share.

  9. Create the /home/public directory as required. Change the permissions to this directory to 1777.

  10. Why do you set permissions to 1777?

  11. Commit your changes.

 step 1: to use the samba server configuration tool, you ll need the root password. step 2: many administrators stick with the default microsoft windows workgroup name of workgroup. you can find it in the output from the smbclient -l // clientname command. step 3: if you want to limit access to your samba server, you can t do it through the samba server configuration tool. you ll want to set up the hosts allow command in /etc/samba/smb.conf. step 4: if you want to restrict access from a specific computer to your samba server, you can t do it through the samba server configuration tool. you ll want to set up the hosts deny = evil crackers.com command in /etc/samba/smb.conf. step 5: when you exit the samba server configurator, or save the smb.conf file, you can make samba read the changes with the service smb reload command. but before committing the changes, you should test them with the testparm command.

4. 

Part 4: Setting Up Printer Shares

  1. Your Linux server has many printers defined. You want to offer access to them to your desktop client users. Enable access to the generic printers share now.

  2. Again, restrict access to your print shares to members of your example.com domain.

  3. Commit your changes.

 step 1: open the main samba configuration file, /etc/samba/smb.conf, in a text editor. step 2: navigate to the [homes] share in the last half of this file. step 3: unless there is a limitation in the globals part of this file, you can limit the [homes] share with the hosts allow = example.com . commit your changes. restart or reload smb under the status menu or with the appropriate service command. step 4: add a guest ok = no to the [homes] stanza. step 5: save the changes you ve made so far. step 6: at the end of the file, start a [public] stanza. add an appropriate comment for the stanza. step 7: set path = /home/public . save your changes to the smb.conf file. step 8: make sure to set hosts allow = example.com . step 9 : set permissions for the public share, with the following commands: # mkdir /home/public # chmod 1777 /home/public create a new directory, /home/public; configure that share in swat and call it public. set the hosts allow setting in swat under the shares menu, and list the domain associated with your network. deny to all others. step 10: the 777 aspect of permissions grants read, write, and execute/search permissions to all users (root, root s group, and everyone else). the 1 at the beginning of the permission value sets the sticky bit. this bit, when set on directories, restricts users from deleting or renaming files they don t own. step 11: commit your changes with the service smb reload command.

5. 

Part 5: Verifying the smb.conf File

  1. You want to verify your changes. Start a terminal window. Run the syntax tester tool on your Samba configuration tool. What program did you use?

  2. Review the /etc/samba/smb.conf file. Look over each section including the [globals] section. Ensure that all updates are correct and reflect the requirements previously stated. Go back and make changes, if necessary. Commit all changes.

  3. Again, go back and make revisions if the test program indicates problems with the smb.conf file.

 step 1: open your /etc/samba/smb.conf configuration file. navigate to the [printers] stanza. the default version of this stanza should already enable access to all users who connect. step 2: in this stanza, use the hosts allow command as before. step 3: commit your changes by closing and saving the smb.conf file, and then running the service smb reload command.

6. 

Part 6: Starting the Samba Servers

  1. Navigate to a command line interface.

  2. Start the Samba server. Which daemons does it start?

  3. If possible, go to a Microsoft Windows computer on your network. Use a Microsoft browsing tool such as Network Neighborhood or My Network Places in Windows Explorer. See if you can connect to the Samba public share. Alternatively, you can go to another Linux computer and browse Nautilus by navigating to smb:///.

  4. Congratulations! You have just configured your Samba server to share files with your local workgroup.

 step 1: you can use the samba syntax checker, testparm , to make sure there are no glaring problems to your samba configuration file. step 2: this is more of an exercise; if you don t have any problems, you might want to deliberately add some to your smb.conf file and rerun testparm again. it s helpful to be familiar with different kinds of samba syntax issues. don t forget to restore a working version of the smb.conf file!

7. 

Part 7: Persistency Check

It is important for your server (and critical to pass the RHCE exam) that any changes you make to your server should be persistent. This means that changes should be active when you reboot Linux. Perform an orderly reboot of your server now and verify that Samba starts when you boot Linux.

  1. How did you make your changes persistent?

  2. What command did you use to perform an orderly shutdown?

 step 1: again, this is more of an exercise than a lab. the steps are generally self-explanatory. if your samba configuration is successful, you should be able to review browseable shares from a microsoft windows computer on the same lan.

Answers

1. 

The first chapter lab on Samba is designed to be easy to follow. However, you'll need explicit Linux knowledge to complete some specific steps. Answers to these steps can be found in the following:

2. 

Step 1: You've installed the Windows File Manager package group, which includes the samba-client, samba, and redhat-config-samba RPMs. These RPMs depend on the samba-common RPM, which you'll also need to install.

Step 2: You can use the chkconfig --level 35 smb on command or the Service Configuration utility described in Chapter 4 to make sure Samba starts the next time you boot Linux.

Step 3: Use the service smb start command to begin the Samba service.

Step 4: One way to verify Samba is to look for the existence of the smbd and nmbd processes in the process table. Use ps aux | grep mbd to see if these processes are present. Another way is with a service command such as service smb status.

3. 

Step 1: To use the Samba Server Configuration tool, you'll need the root password.

Step 2: Many administrators stick with the default Microsoft Windows workgroup name of WORKGROUP. You can find it in the output from the smbclient -L //clientname command.

Step 3: If you want to limit access to your Samba server, you can't do it through the Samba Server Configuration tool. You'll want to set up the hosts allow command in /etc/samba/smb.conf.

Step 4: If you want to restrict access from a specific computer to your Samba server, you can't do it through the Samba Server Configuration tool. You'll want to set up the hosts deny = evil crackers.com command in /etc/samba/smb.conf.

Step 5: When you exit the Samba Server Configurator, or save the smb.conf file, you can make Samba read the changes with the service smb reload command. But before committing the changes, you should test them with the testparm command.

4. 

Step 1: Open the main Samba configuration file, /etc/samba/smb.conf, in a text editor.

Step 2: Navigate to the [homes] share in the last half of this file.

Step 3: Unless there is a limitation in the Globals part of this file, you can limit the [homes] share with the hosts allow = example.com. Commit your changes. Restart or reload smb under the Status menu or with the appropriate service command.

Step 4: Add a guest ok = no to the [homes] stanza.

Step 5: Save the changes you've made so far.

Step 6: At the end of the file, start a [public] stanza. Add an appropriate comment for the stanza.

Step 7: Set path = /home/public. Save your changes to the smb.conf file.

Step 8: Make sure to set hosts allow = example.com.

Step 9: Set permissions for the public share, with the following commands:

# mkdir /home/public # chmod 1777 /home/public

Create a new directory, /home/public; configure that share in SWAT and call it public. Set the hosts allow setting in SWAT under the Shares menu, and list the domain associated with your network. Deny to all others.

Step 10: The 777 aspect of permissions grants read, write, and execute/search permissions to all users (root, root's group, and everyone else). The 1 at the beginning of the permission value sets the sticky bit. This bit, when set on directories, restricts users from deleting or renaming files they don't own.

Step 11: Commit your changes with the service smb reload command.

5. 

Step 1: Open your /etc/samba/smb.conf configuration file. Navigate to the [printers] stanza. The default version of this stanza should already enable access to all users who connect.

Step 2: In this stanza, use the hosts allow command as before.

Step 3: Commit your changes by closing and saving the smb.conf file, and then running the service smb reload command.

6. 

Step 1: You can use the Samba syntax checker, testparm, to make sure there are no glaring problems to your Samba configuration file.

Step 2: This is more of an exercise; if you don't have any problems, you might want to deliberately add some to your smb.conf file and rerun testparm again. It's helpful to be familiar with different kinds of Samba syntax issues. Don't forget to restore a working version of the smb.conf file!

7. 

Step 1: Again, this is more of an exercise than a lab. The steps are generally self-explanatory. If your Samba configuration is successful, you should be able to review browseable shares from a Microsoft Windows computer on the same LAN.

Lab 2: Creating a Printer

2. 

In this lab, you'll want to use the Red Hat Printer Configuration utility to connect a printer to your Linux system. The printer can be local or remotely connected through your LAN. As you'll want to create a printer class, you'll need more than one printer.

If you have only one physical printer, you can set up multiple print queues with different printer names. CUPS sees each print queue as if it were a separate printer.

Once you've created multiple printers, open a GUI Web browser. Navigate to http://localhost:631. Click the Class link and then click Add Class. Follow the prompts to create a printer class with the printers that you've configured.

Once you've created a new printer class, inspect the result in the /etc/cups/classes.conf configuration file. Check the contents of your /etc/printcap file. What are the names of the printers that you see? Are there any surprises in the list?

If you have a Microsoft Windows computer on your network, activate the Samba service if required. Check the printer names as shown in the browse list. Are there any surprises on this list?

 step 1: to complete many linux configuration changes, you need to make sure that the service will start automatically when you reboot your computer. in general, the key command is chkconfig . in this case, the chkconfig --level 35 smb on command sets up the smbd daemon to become active when you boot linux into either runlevel 3 or runlevel 5. step 2: the command you should always use to perform an orderly shutdown is shutdown -r now . starting the printer configuration utility is easy. one way in the gui is to click main menu | system settings | printing. then you can click the add button to start what is known in the microsoft world as a configuration wizard. if you like, you can create two different print queues with the same printer. just repeat the same process, using a different printer name. open the web browser of your choice. the default is mozilla, which you can start in the gnome desktop by clicking the globe icon adjacent to the main menu icon. you can then navigate to http://localhost:631. once the cups web-based tool opens, you can click the classes or the manage printer classes link. click add class in the class web page. enter the root username and password when prompted. enter the single-word name of your choice for the printer class name. add the name or ip address of the computer in the location text box. enter the comment of your choice in the description text box. click continue; select more than one computer as members of the printer class. click continue; once your new printer class is confirmed, you can close the browser. you should now see the printer class and member printers in the /etc/cups/classes.conf file. you ll find a list of printers in /etc/printcap; you ll find the names of any configured printers and printer classes in this file. you should also see the list of printers in /etc/printcap in any microsoft windows network neighborhoods or my network places that is connected to the same network. this assumes that you ve activated a samba server on the local print server computer, of course.

Answers

2. 

Step 1: To complete many Linux configuration changes, you need to make sure that the service will start automatically when you reboot your computer. In general, the key command is chkconfig. In this case, the chkconfig --level 35 smb on command sets up the smbd daemon to become active when you boot Linux into either runlevel 3 or runlevel 5.

Step 2: The command you should always use to perform an orderly shutdown is shutdown -r now.

Starting the Printer Configuration utility is easy. One way in the GUI is to click Main Menu | System Settings | Printing. Then you can click the Add button to start what is known in the Microsoft world as a configuration wizard. If you like, you can create two different print queues with the same printer. Just repeat the same process, using a different printer name.

Open the Web browser of your choice. The default is Mozilla, which you can start in the GNOME desktop by clicking the globe icon adjacent to the Main Menu icon. You can then navigate to http://localhost:631.

Once the CUPS Web-based tool opens, you can click the Classes or the Manage Printer Classes link. Click Add Class in the Class Web page. Enter the root username and password when prompted.

Enter the single-word name of your choice for the printer class name. Add the name or IP address of the computer in the Location text box. Enter the comment of your choice in the Description text box. Click Continue; select more than one computer as members of the printer class. Click Continue; once your new printer class is confirmed, you can close the browser.

You should now see the printer class and member printers in the /etc/cups/classes.conf file. You'll find a list of printers in /etc/printcap; you'll find the names of any configured printers and printer classes in this file. You should also see the list of printers in /etc/printcap in any Microsoft Windows Network Neighborhoods or My Network Places that is connected to the same network. This assumes that you've activated a Samba server on the local print server computer, of course.



 < Day Day Up > 



RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
ISBN: 71765654
EAN: N/A
Year: 2003
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net