Results 1 to 4 of 4

Thread: Configuring Linux in a Windows Network with SAMBA

  1. #1
    Join Date
    Jul 2010
    Posts
    118

    Configuring Linux in a Windows Network with SAMBA

    Samba is a network service that implements just the SMB protocol (Server Message Block) which makes a Linux PC to appear internal network like any Windows PC. Samba is not installed automatically (except on some distributions, eg. Red Hat) but is almost always down. You can download and install Samba from the www.samba.org very easily.

    Code:
    # Rpm-Uhv samba *. rpm
    <span style='font-size:8pt;line-height:100%'> NB.I rpm packages can be taken from the above website in the 'binaries', then choosing to enter the dir distribution of choice (eg Fedora / RPMS/i386/core/3 /)...</ span>

    <span style='color:blue'> Compiling the Source </ span>
    procured once the source of samba and unpacked in a folder at will need to configure. Where the source folder does not contain the configure script should create it before continuing with the autoconfig with the following command:
    Code:
    . / Autogen.sh
    Now you must compile the source:
    . / Coonfigure - help
    to know what special options can be enabled, then:
    Code:
    . / Configure [... topics ...]
    then create the bin:
    Code:
    make
    and then install the bin and the manual pages with the command:
    Code:
    make install
    If you prefer you can install the bin files and pages separately by running:
    Code:
    make installbin
    In case you need support for Active Directory remember that you must have installed on your system:
    • The MIT or Heimdal Kerberos libraries
    • The OpenLDAP libraries

    If the Kerberos libraries have been previously installed in a directory other than default, remember to add the configuration options :
    Code:
    - With-krb5 = "installation path"
    So be sure once compiled the source files that include / config.h generated contains the following lines:
    Code:
    # Define HAVE_KRB5 1 
    # Define HAVE_LDAP 1
    If there were no monitors to check the log file config.log why? did not find the libraries and provide correct any errors.

    <span style='font-size:14pt;line-height:100%'> Server Configuration </ span>
    <span style='color:blue'> Manual configuration of the server </ span>

  2. #2
    Join Date
    Jul 2010
    Posts
    118

    Re: Configuring Linux in a Windows Network with SAMBA

    After installation, we need to verify that the file / etc / services are no reserved ports to Samba.

    netbios-ns 137/tcp # NETBIOS Name Service
    netbios-ns 137/udp
    netbios-dgm 138/tcp # NETBIOS Datagram Service
    netbios-dgm 138/udp
    netbios-ssn 139/tcp # NETBIOS Session Service
    netbios-ssn 139/udp
    and that should have started two daemons smbd (Samba configuration) and nmbd (the management and distribution of network resources) to check there. Then just type :
    Code:
    ps-ef | grep mbd
    and verify that there are two lines that says smbd D and nmbd D. If this were not enough to put them in an init file (/ etc / rc.d / rc.local).

    Now we go to edit the file smb.conf located in the / etc directory.

    [Global]

    It's the general section and perhaps the most important files, and an example :

    workgroup = working_group (the name given to our working group under windows)
    hosts allow = ip enter the network and possibly the loopback address (127.0.0.1) (only the computers on the local network will have access to resources)

    guest account = nobody (defines the user name which provide access to services)
    printing = bsd (assigning this string Samba uses lpr for printing)
    printcap name = / etc / printcap (the path of the file linux with the specifications for the printer)
    encrypt passwords = yes
    netbios name = netbios enter the name of our machine that one with which we will see a shared network
    interfaces = insert IP address and subnet of our network should not be one with which you connect to the Internet
    os level = 34

    Domain Management
    • domain master = yes
    • local master = yes
    • preferred master = yes


    The temporary directory
    [Tmp]
    path = / tmp
    public = yes
    printable = no
    guest ok = yes
    writable = yes

    [Homes]

    This section (optional) allows users logged on the Windows machine to access their Linux home directory.

    [Homes]
    Comment = Home Directory
    browsable = yes (we allow the resource to be shown to all)
    read only = no
    printable = no
    create mode = 0750 (type of permissions for each file you create from the Windows machine)
    [Public]

    comment = Public Directory
    path = / dir / shared
    browsable = yes
    read only = no
    public = yes
    create mode = 0777
    The directory / dir / shared will 'be used and will be visible to all? previously created with mkdir and permissions for all chmod a + rwx / dir / shared.
    logon

    [Netlogon]
    Provides comment = Network Logon Service
    path = / etc / samba / netlogon
    guest ok = yes
    writable = no
    locking = no
    public = no
    browseable = yes
    share modes = no

    After changes to smb.conf you test the configuration with the command :
    testparm
    Now we restart the smbd and nmbd services with the commands:
    smbd & nmbd restart & restart
    Under Fedora (and RedHat) using
    service smb restart
    Now all Windows machines will be able to "see" the Linux machine as if it were their own kind.
    <span style='color:blue'> Server Configuration Wizard </ span>

  3. #3
    Join Date
    Jul 2010
    Posts
    118

    Re: Configuring Linux in a Windows Network with SAMBA

    Configuring a Windows system to join a domain (domain is defined as a set of computers where security management Entrusted to one entity Center, called PDC), varies depending on the version:

    Windows 2000:

    The procedures are the same as for Windows NT except the network settings are found under Control Panel> System> Network Identification (or, on the Desktop, right-click the My Computer icon, select Properties', click on the Network Identification tab and the Properties button).

    Windows XP:

    Note that only XP Professional Edition can be used to join a domain, Windows XP Home Edition can not join a domain.
    1. Click on Start> Control Panel> Administration Tools> Local Security Policy> Local Policies> Security Options
    2. Uncheck Domain member: Digitally encrypt or sign secure channel data (always)
    3. Disable the "Domain controller: refuses machine account password changes?
    4. Disable the item "(Domain member: Require session key (Windows 2000 or later)?)
    5. Download from Samba.org patch to register WinXP_SignOrSeal. To apply double click .Reg file and answer Yes to questions
    6. At this point we can join the domain as Windows NT/2000: Right-click My Computer, select Properties, computer name and edit key.

    To connect to a Samba share from a Microsoft Windows machine, use Network Neighborhood or the graphical file manager.

    <span style='color:blue'> Systems Linux / Unix </ span>

    Even Linux systems, of course, can join a domain with a Samba PDC (primary domain controller and contains such a list of client names, their passwords, group membership, etc ...) and if the file server, you can configure Samba to allow authentication via the domain. Of course the Samba PDC to be created a computer account for our local Samba (with the name specified in netbios name) and, in this case, the local computer must first join the domain, with a procedure comparable to those seen above for Windows clients. On Linux / Unix local enough to write:
    Code:
    smbpasswd-j-r-u root
    If you want to access shared resources as if they were part of the file-system as an external resource should be "Mount" the resource. Smbmount that and a demon equivalent to the command mount-t smbfs. To use it, must have completed making sure that the source has been enabled in the configure option - with-smbmount and must ensure that the kernel has enabled support for the filesystem SMB / CIFS. You run smbmnt typing.Let's see the syntax and more options significant :

    smbmount service mntpoint [-o option]
    The options are specified separated by a comma and the model with key = value, pi are:
    • username = arg: Allows you to specify a user who access the resource. If not specified will be used data from the user environment variables. It also supports the use of syntax as user% password or user / workgroup or user / workgroup% password.
    • password = arg: Allows you to specify a password.
    • credentials = filename: Allows you to define an external file for the specific user and password. NetBiosName = arg: Allows you to specify a NetBIOS name for the source. If not specified uses the local hostname.
    • uid = arg: Allows you to specify a user who will be owner for all files in the resource, can you specified using the numeric ID for the user or his name.
    • gid = arg: Allows you to specify the group owner for all files in the resource mounted. You can define for id or name.
    • port = arg: specify a port other than the standard 139 to communicate with the remote resource.
    • fmask = arg: Defines the file permissions of the resource mounted. If not specified, uses the current umask.
    • dmask = arg: Same as above but for directories.
    • ip = arg: set IP address or name of remote host to which you want to connect.
    • workgroup = arg: Allows you to specify the workgroup to which refers the shared resource to mount.
    • rw: Mount the resource read and write mode.
    • ro: Mount the resource read-only mode


    If Linux user not configured on the machine can configured to use a username and password.

    Code:
    # Smbmount / / serversamba / shared_cart / mnt / dirsamba-o username = user% pwd
    Once mounted the resource you can dismount smbumount (The superuser can still unmount with umount resources).

  4. #4
    babare Guest

    Re: Configuring Linux in a Windows Network with SAMBA

    merci mon frere

Similar Threads

  1. How to mount samba share in Linux Redhat?
    By Mishraji in forum Operating Systems
    Replies: 4
    Last Post: 13-11-2010, 02:32 AM
  2. How to add auto map network drive in samba server config
    By Feng in forum Networking & Security
    Replies: 6
    Last Post: 11-05-2010, 10:56 PM
  3. Samba mount in linux
    By Caden Fernandes in forum Operating Systems
    Replies: 4
    Last Post: 15-03-2010, 06:52 PM
  4. Opening port for Linux Samba for windows users
    By afidelino in forum Networking & Security
    Replies: 5
    Last Post: 10-03-2010, 09:19 PM
  5. Win xp in a linux: samba
    By Jasonholt in forum Operating Systems
    Replies: 2
    Last Post: 26-11-2008, 07:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,247,176.74323 seconds with 16 queries