Open main menu

CDOT Wiki β

Changes

OPS335 Lab 6

3,116 bytes added, 03:46, 12 July 2016
Added several different tools for accessing a samba share from a Linux machine.
'''Record steps, commands, and your observations in INVESTIGATION 1 in your OPS335 lab log-book'''
==INVESTIGATION 2: CONNECTING TO A LINUX SMB SERVER FROM A LINUX CLIENT== In this investigation you will explore some of the different ways to access a shared directory from a Linux client machine (VM1). '''Perform the following steps on your VM1''' === Using smbclient ===*Install the '''samba-client''' and '''cifs-utils''' packages.*Use the "smbclient" command in a terminal window. smbclient '\\vm2\home' -U <learnid>*After entering your password you should get a prompt similar to smb: \>*Enter the ls command to see a list of the files in your home directory - you may receive the following error if you are in a section with SELinux Enforcing. smb: \> ls NT_STATUS_ACCESS_DENIED listing \**If you received that error, SELinux will need to be adjusted (on the samba server) for this to work. setsebool -P samba_enable_home_dirs 1*Once you have access to the directory use the get and put commands (similar to ftp) to move files.*When you are finished close the connection.*Note that this tool only gave temporary access with a limited set of commands. === Using 'mount -t cifs' ===*The next way is to use the mount command.*Use the mount command on '''vm1''' to mount your home directory mkdir /tmp/vm2-home mount -t cifs //vm2/home /tmp/vm2-home -o username=<learnid> ls /tmp/vm2-home*Create a file in that directory, then switch to '''vm2''' to confirm that it was created.*Use umount to unmount that directory.*Note that this tool would leave the directory mounted until the machine rebooted or it was unmounted. It would also allow other users access to the directory, as it effectively became part of the local filesystem. It could even be added to fstab to be mounted on boot. '''The following steps require a graphical interface; perform them on your HOST''' === Using Nautilus to browse Samba shares ===*Install the '''samba-client''' and '''cifs-utils''' packages.*Use the "Places" menu from the desktop and open 'Browse Network'.*From the menu in the side-bar of the files tool, choose 'Connect to Server'. *Enter 'smb://vm2/home' as the location, and enter your samba password in the prompt.**Where vm2 is the name of the server, and home is the name of the directory it is sharing.*After you have checked that you can access your files, unmount the share by right-clicking its icon in the side-bar and clicking 'Unmount'. === Using a browser ===*You can also use a web browser with support for the SMB protocol such as Konqueror.**Note that firefox does not have such support. *If Konqueror is not installed then install it with the command: yum install kdebase*Start Konqueror, the web/file browser, and in the address bar enter the following smb://vm2/home*Enter your username and password when prompted.*Double click on a file you have some text in.**Open it with gedit, make some changes, and save it.**When prompted, choose to upload the file.*Close Konqueror.*cat the file on your VM2 to ensure the changes were properly uploaded. '''Record steps, commands, and your observations from this INVESTIGATION in your OPS335 lab log-book''' ==INVESTIGATION 3: CONNECTING TO A SAMBA SERVER FROM A WINDOWS CLIENT==
This investigation will configure your VM2 machine to act as a Samba File server to allow Windows OS Users access to the Linux Samba server files.
'''Record steps, commands, and your observations in from this INVESTIGATION 2 in your OPS335 lab log-book'''
==COMPLETING THE LAB==
932
edits