Changes

Jump to: navigation, search

OPS335 Samba Lab

249 bytes removed, 17:15, 4 November 2015
m
fixing warning.
[[Category:OPS335]][[Category:OPS335 Labs]]
=Samba - A Windows SMB/CIFS fileserver for UNIX=
{{Admon/important|Warning|Make sure that your VMs are fully updated before you begin this lab.}}
 
As we are only using two VMs in this lab and will be running a graphical interface on VM1, you may wish to temporarily give VM1 access to more RAM for the duration of this lab.}}
==Configuring a Samba Server on Linux==
*On your VM 2 install Samba
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
hosts allow = 142.204.141. <first three octets of network address followed by period e.g. "192.168.6."> ; note: the above line will allow access from the Seneca domain in lab T2107. You will have to change this depending on which lab you are in.
[home]
comment = "put your real name here without the quotes"
path = /home/<learnid>
valid users = <learnid>
; remember <learnid> is your seneca account name
public = no
writable = yes
printable = no
create mask = 0765
*Now add a parameter to the global section that will limit access to the share so that only machines in your virtual network and those in the lab room will be able to access it.
*Add a parameter to the home section so that only your user account can access that share.
*Create a Samba password for user <learnid> with the command
smbpasswd -a <learnid>
== Using smbclient ==
*In a full installation you should not need to install samba-client on your vm1host, but if it is not present then do so.*You will also need to install the cifs-utils package to be able to mount the filesystem.*From vm1 the host use the "smbclient" command in a terminal window.
smbclient '\\vm2\home' -U <learnid>
*After entering your password you should get a prompt similar to
*SE Linux should be in Enforcing and 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.
== Using 'mount -t cifs' ==
*The next way is to use the mount command.
*Use the mount command on vm1 the host to mount your home directory
mkdir /tmp/vm2-home
mount -t cifs //vm2/home /tmp/vm2-home -o username=<learnid>
== Using Nautilus to browse Samba shares ==
*Start a graphical interface on vm1.*Use the "ActivitiesPlaces" menu from the desktop on and open 'filesBrowse 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.
==Completing the Lab==
While completing this lab you have gained experience using a service designed to allow interaction from a variety of client tools on multiple OS platforms. You have also experienced service related tools that allow you to view configuration parameters and errors in real-time.
 
{{Admon/important|Warning|If you gave your VM1 more RAM, set it back to normal now.}}
Exploration questions:
932
edits

Navigation menu