User Tools

Site Tools


user:ccornair:portfolio:hpc0project2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
user:ccornair:portfolio:hpc0project2 [2013/01/24 01:27] – external edit 127.0.0.1user:ccornair:portfolio:hpc0project2 [2013/05/06 00:58] (current) – [Project: network services (samba)] ccornair
Line 1: Line 1:
 +======Project: network services (samba)======
 +
 +this project is going to be done all by my lonesome
 +this project was started may 1st 2013 and hopefully will only take a couple of hours 
 +
 +=====Objectives=====
 +This project is required by the class, the reason for doing this project is to learn how to set up a samba server and communicate with windows machines
 +
 +=====Prerequisites=====
 +
 +  
 +Linux VM Server Install
 +Creating Virtual Machines
 +
 +=====Background=====
 +The commercialization of the Internet over the past few years has created something of a modern melting pot. It has brought business-folk and technologists closer together than was previously thought possible. As a side effect, Windows and Unix systems have been invading each others' turf, and people expect that they will not only play together nicely, but that they will share. 
 +
 +
 +=====Scope=====
 +
 +for this project I am attempting to set up a samba server, I am doing this to try to get a windows and a Linux machine to communicate, I hope to make a socket for this as well but if not I will continue to work on this even after the semester.  I also am making one for windows too and hope to get them communicating
 +
 +
 +=====Attributes=====
 +State and justify the attributes you'd like to receive upon successful approval and completion of this project.
 +
 +  I guess the overall attributes I would like to obtain in this is some networking experience between the two of the operating systems
 +=====Procedure=====
 +steps:
 +
 +1) first you need to install samba using apt-get install samba
 +
 +2) Now activate  the  line security = user
 +type the command: vi /etc/samba/smb.conf
 +and add the following text
 +
 +
 +# “security = user” is always a good idea. This will require a Unix account
 +
 +# in this server for every user accessing the server. See
 +
 +# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
 +
 +# in the samba-doc package for details.
 +
 +security = user
 +This enables Linux system users to log in to the Samba server.
 +save , exit and restart Samba:
 +
 +3)next use the command /etc/init.d/samba restart, this restarts your samba
 +
 +4) now add the samba shares, This will add a share that will be accessible from  all users.
 +
 +    Create the directory for sharing the files and change the group to the users group:
 +    mkdir -p /home/samba-share/allusers
 +
 +    chown -R root:users /home/samba-share/allusers/
 +
 +    chmod -R ug+rwx,o+rx-w /home/samba-share/allusers/
 +    
 +  - At the end of the file /etc/samba/smb.conf add the following lines:
 +
 +    First open the smb.conf file using the command:
 +
 +    vi /etc/samba/smb.conf
 +    
 +    add the following text
 +    
 +    [allusers]
 +    comment = All Users
 +    path = /home/samba-share/allusers
 +    valid users = @users
 +    force group = users
 +    create mask = 0660
 +    directory mask = 0771
 +    writable = yes
 +    
 +    If you want all users to be able to read and write to their home directories via Samba, add the following lines to   /etc/samba/smb.conf:
 +    
 +    [homes]
 +    comment = Home Directories
 +    browseable = no
 +    valid users = @users
 +    writable = yes
 +    create mask = 0700
 +    directory mask = 0700
 +
 +    save and restart Samba:
 +
 +    /etc/init.d/samba restart
 +    
 +5) Add and manage the Users
 +
 +   use the command useradd  samba-user -m -G users, just replace the desired name for samba-user
 +   
 +6) next you need to set up a password for the user
 +   
 +   passwd samba-user     just replace samba-user with the name used to create profile
 +   
 +   
 +7) now add the user to the samba database 
 +
 +   smbpasswd -a samba-user      once again replace the samba-user with the name used for the profile
 +   
 +   
 +   NOW YOU HAVE A SAMBA SERVER BEEATCHES!!!
 +
 +    
 +
 +    
 +    
 +    
 +    
 +    
 +    
 +    
 +
 +
 +=====Code=====
 +Upon completion of the project, if there is an applicable collection of created code, place a copy of your finished code within <nowiki><code> </code></nowiki> blocks here.
 +
 +<code c>
 +/*
 + * hello.c - A sample "Hello, World!" program
 + 
 + * written by NAME for COURSE on DATE
 + *
 + * compile with:
 +   gcc -o hello hello.c
 + *
 + * execute with:
 +   ./hello
 + */
 +
 +#include <stdio.h>
 +
 +int main()
 +{
 +    printf("Hello, World!\n");    // Output message to STDOUT
 +    return(0);
 +}
 +</code>
 +
 +=====Execution=====
 +Again, if there is associated code with the project, and you haven't already indicated how to run it, provide a sample run of your code:
 +
 +<cli>
 +lab46:~/src/cprog$ ./hello
 +Hello, World!
 +lab46:~/src/cprog$ 
 +</cli>
 +
 +=====Reflection=====
 +I guess the main reflection on this project is the fact that it was actually pretty easy to set up and I will for sure keep working on this to see what the capabilities are for this project
 +=====References=====
 +In performing this project, the following resources were referenced:
 +
 +  * http://www.unixmen.com/standalone-samba-in-debian-squeeze/
 +  
 +