Section 33.5. File and Service Sharing (Topic 2.209)


33.5. File and Service Sharing (Topic 2.209)

33.5.1. Review Questions

  1. You have verified that the smbd daemon is running, but remote users cannot seem to see your Samba shares. What other daemon needs to be running?

  2. What is the purpose of the root_squash and ro=hostname.domainname.com options in the /etc/exports file?

  3. An administrator has just updated the /etc/exports command. The NFS daemon is running. What NFS command should be executed, and what separate daemon should be running, so that remote users can access the share?

  4. What is the purpose of the following entries in an NFS configuration file?

     uid   0-60       -    # switch to nobody uid   61-80     41    # map 61-80 into 41-60 

  5. You have configured a Linux system as a client in an older WINS network. The name of the Linux client is jerry. You wish to determine whether the WINS server is properly resolving your client's IP address. The name of the WINS server is win1.garcia.com. What command would you issue?

  6. You wish to mount a remote Samba share using the smbmount command. You have already set up the /usr/local/zeppelin directory as the mount point. The hostname of the remote system is jimmy. The name of the remote share is page. The username is robert. You want to specify the password when prompted. What does the command look like?

  7. You wish to use the smbclient command to mount a remote directory. This command will be in a script, so you want to specify the username and password. The remote hostname is pink, and the share name is floyd. The username is david and the password is gilmour. What would the command look like?

33.5.2. Answers

  1. The Samba NetBIOS name server, called nmbd.

  2. The root_squash parameter forces the root user to have the same permissions as the nobody account. It helps ensure that remote users cannot overwrite essential system configuration files and other important files in the mounted directory.

  3. The exportfs -a command must be executed and the portmapper daemon must be running.

  4. The entries map remote users to local user accounts, to help ensure that user IDs are properly processed.

  5. nmblookup -U win1.garcia.com -R jerry.

  6. smbmount //jimmy/page /usr/local/zeppelin -U=robert.

  7. smbclient //pink/floyd -U david%gilmour.

33.5.3. Exercises

  1. Install NFS. Then configure the /etc/exports file to share a single directory read-only. Use the exportfs -a command to inform NFS of your changes. You may also have to verify that the portmapper is working properly. Use the nfsstat command to verify the status of the NFS shares on your server.

  2. Now use the mount command on a remote system to mount the directory you have just shared via NFS. Then unmount the directory. Reexport the directory on the server so that users can write to it. You may have to adjust the permissions using chmod, as well as change the contents of the /etc/exports file. Use the showmount command to verify that NFS mounts for the client are working properly.

  3. Once you have NFS working, verify that your NFS system is capable of conducting soft and hard retries. After making changes to your NFS server, restart the server. Then unplug the system from the network. Plug the system back in. What kind of error messages did the client receive?

  4. Configure user ID mapping for your NFS server. Verify that the mapping is working correctly by using the nfsstat command.

  5. Configure access control for your NFS server. Make sure that only a specific system can access your shares.

  6. Install Samba using the appropriate packaging utility for your system. Source files, should you wish to install them by tarball, are available at http:www.samba.org. Then edit the /etc/samba/smb.conf to:0

    • Enable user-level security.

    • Encrypt passwords sent between systems. This enables Samba to communicate with Windows systems.

    • Specify the homes share, which allows all home directories to be shared to users that specify the proper username and password.

  7. Use the smbpasswd -a command to create a user database, then add users that you wish to access resources.

  8. Start Samba (both nmbd and smbd).

  9. Mount a directory using the smbclient command. If you have a Windows system available, use the Windows browser to open your share. Be sure to either log on with the username your Linux server recognizes or specify the correct login credentials. If you encounter any problems, use the smbstatus and nmblookup commands to verify that your Samba system is working properly.

  10. Once you have configured Samba to work correctly, configure it as a WINS server. Be careful that you do not specify the WINS server as a WINS client. Also, make sure that there is only one WINS server on the network.

  11. Configure your Samba server so that it has access control. Edit the samba.conf file so that the Samba server responds only to certain systems.

  12. Install a printer on the system. Now configure the samba.conf file so that the printer is shared. Use either a Linux or Windows system to access the printer share.

  13. Use the smbmount command on a remote system to mount the Samba share you have created.

  14. Use the smbtestparm command to verify current settings. See if there is anything that you would like to change or whether you can find any unexpected settings.



LPI Linux Certification in a Nutshell
LPI Linux Certification in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596005288
EAN: 2147483647
Year: 2004
Pages: 257

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