Open main menu

CDOT Wiki β

Changes

OPS335: File Servers

23 bytes removed, 10:40, 5 March 2016
no edit summary
'''Record steps, commands, and your observations in INVESTIGATION 1 in your OPS335 lab log-book'''
==INVESTIGATION 2: USING A SAMBA SERVER TO SHARE FILES FROM OTHER LINUX SERVERS ==
Although the main purpose of running a samba server is to share files on a Windows server, you can also install a Samba client on another Linux machine to share files as well. This lab will demonstrate how to setup a Samba client on your '''host''' machine, mount the samba share on a directory, and access files on the remote Linux machine ('''vm2''').  === Accessing and Sharing Files on Remote Linux Server (smbclient)===   '''Perform the following steps:''' #In a full installation (on your host Linux machine) you should not need to install the '''samba-client''' application on your host, but if it is not present, then install that application.#You will also need to install the ''cifs-utils'' package to be able to mount the filesystem:<br>'''yum install cifs-utils'''#From the host use the "smbclient" command in a terminal window:<br>'''smbclient '\\vm2\home' -U <learnid>'''#After entering your password you should get a prompt similar to:<br>'''smb: \>'''#Enter the ls command to see a list of the files in your home directory:<br>'''smb: \> ls'''<br><br>'''NOTE:''' you may receive the following error: ''NT_STATUS_ACCESS_DENIED listing''<br><br>#SE Linux should be in Enforcing and will need to be adjusted (on the samba server) for this to work by issuing the command:<br>'''setsebool -P samba_enable_home_dirs 1'''#Once you have access to the directory use the '''get''' and '''put''' commands (similar to sftp) to move files.#When you are finished close the connection. === Mounting a Remote Linux Volume (mount -t cifs) === When performing the NFS lab, one of the initial purpose of using NFS was allowing network shares to mount remote volumes as opposed to using '''sftp''' (''get'' and ''put'' commands). This section will demonstrate how to '''mount a remote Linux volume''' as a directory for the client Linux server. '''Perform the following steps:''' #Issue the following command to create a mount point called vm2-home:<br>'''mkdir /tmp/vm2-home'''#Issue the following command in order to mount your home directory:<br>'''mount -t cifs //vm2/home /tmp/vm2-home -o username=<learnid>'''#Verify that the mount worked by issuing the following command:<br>'''ls /tmp/vm2-home'''#What is the advantage of using this method as opposed to the smbclient command in the previous section? Record your answer in your lab log-book.  '''Record steps, commands, and your observations in INVESTIGATION 2 in your OPS335 lab log-book''' ==INVESTIGATION 3: CONNECTING TO A SAMBA SERVER FROM A WINDOWS CLIENT==
This investigation will configure your host machine to access files in a MS Windows server via command line and graphically.
'''Record steps, commands, and your observations in INVESTIGATION 3 2 in your OPS335 lab log-book'''  ==UNDER CONSTRUCTION: TO BE REMOVED AND / OR ABSORBED == Although the main purpose of running a samba server is to share files on a Windows server, you can also install a Samba client on another Linux machine to share files as well. This lab will demonstrate how to setup a Samba client on your '''host''' machine, mount the samba share on a directory, and access files on the remote Linux machine ('''vm2''').  === Accessing and Sharing Files on Remote Linux Server (smbclient)===   '''Perform the following steps:''' #In a full installation (on your host Linux machine) you should not need to install the '''samba-client''' application on your host, but if it is not present, then install that application.#You will also need to install the ''cifs-utils'' package to be able to mount the filesystem:<br>'''yum install cifs-utils'''#From the host use the "smbclient" command in a terminal window:<br>'''smbclient '\\vm2\home' -U <learnid>'''#After entering your password you should get a prompt similar to:<br>'''smb: \>'''#Enter the ls command to see a list of the files in your home directory:<br>'''smb: \> ls'''<br><br>'''NOTE:''' you may receive the following error: ''NT_STATUS_ACCESS_DENIED listing''<br><br>#SE Linux should be in Enforcing and will need to be adjusted (on the samba server) for this to work by issuing the command:<br>'''setsebool -P samba_enable_home_dirs 1'''#Once you have access to the directory use the '''get''' and '''put''' commands (similar to sftp) to move files.#When you are finished close the connection. === Mounting a Remote Linux Volume (mount -t cifs) === When performing the NFS lab, one of the initial purpose of using NFS was allowing network shares to mount remote volumes as opposed to using '''sftp''' (''get'' and ''put'' commands). This section will demonstrate how to '''mount a remote Linux volume''' as a directory for the client Linux server. '''Perform the following steps:''' #Issue the following command to create a mount point called vm2-home:<br>'''mkdir /tmp/vm2-home'''#Issue the following command in order to mount your home directory:<br>'''mount -t cifs //vm2/home /tmp/vm2-home -o username=<learnid>'''#Verify that the mount worked by issuing the following command:<br>'''ls /tmp/vm2-home'''#What is the advantage of using this method as opposed to the smbclient command in the previous section? Record your answer in your lab log-book.  '''Record steps, commands, and your observations in INVESTIGATION 2 in your OPS335 lab log-book''' 
==COMPLETING THE LAB==
13,420
edits