FC2 Samba einrichten

Dieses Thema im Forum "RedHat,Fedora & CentOS" wurde erstellt von Bandit2004, 22.09.2004.

  1. #1 Bandit2004, 22.09.2004
    Zuletzt von einem Moderator bearbeitet: 22.09.2004
    Bandit2004

    Bandit2004 Mitglied

    Dabei seit:
    20.09.2004
    Beiträge:
    26
    Zustimmungen:
    0
    Und noch ein Tutorial für Sie ;) (Leider wieder auf English) :)

    Quelle: http://fedoranews.org/krishnan/tutorial/samba/index.shtml
    Autor: Krishnan Subramanian
    ============

    Part 1: Installing Samba

    Download the latest RPMs from http://us2.samba.org/samba/ftp/Binary_Packages/Fedora/RPMS/i386/core/2/.
    You can alternately select any other mirrors from Samba Website.
    Download the following RPMs from the nearest mirror.

    samba-3.0.1-1.i386.rpm
    samba-client-3.0.1-1.i386.rpm
    samba-common-3.0.1-1.i386.rpm
    samba-swat-3.0.1-1.i386.rpm


    For the sake of explanation, let us assume that you save the files in /tmp/samba folder. Now this folder contains all the files needed for Samba installation including Samba client and swat (Samba Web Administration Tool)

    Open a terminal window and login as root by using su command and entering the root password. If you are already logged in as root, skip this step and go to the next step.

    [user@machinename samba]#su
    Password:


    If you are installing Samba for the first time, follow this step else skip this and go to the next step.

    [root@machinename samba]# rpm -ivh samba-*.i386.rpm
    warning: samba-3.0.1-1.i386.rpm: V3 DSA signature: NOKEY, key ID 2f87af6f
    Preparing... ########################################### [100%]
    1:samba-common ########################################### [ 25%]
    2:samba ########################################### [ 50%]
    3:samba-client ########################################### [ 75%]
    4:samba-swat ########################################### [100%]
    [root@machinename samba]#

    You can safely ignore the warning right now. Information on the warning and taking care of it is beyond the scope of this tutorial. If you have Samba installed in the system, you can upgrade to the latest version by

    [root@machinename samba]# rpm -Uvh samba-*.i386.rpm



    Part 2: Configuring Samba

    Now we will configure the Samba installation by editing the configuration file. The configuration file smb.conf is present in /etc/samba/. We will setup the configuration file to share the user's home directory and a public directory /tmp to share files among users.

    [root@machinename samba]#cd /etc/samba
    [root@machinename samba]#vi smb.conf

    Under global settings,

    [global]

    workgroup = Myworkgroup

    server string = Machinename Samba Server

    This sets the workgroup name and the server string. You can assign the name of your workgroup and any server string you want to assign.

    hosts allow = 192.168.1.

    This is very important from the security point of view. You can set the hosts you want to allow here. In this example, all the hosts in the local area network with the IP addresses 192.168.1.* to access the Samba share.

    security = user

    In User Level Security, the client will send a session setup request directly following protocol negotiation. This request provides a username and password. The server can either accept or reject that username/password combination.

    Under share definitions, you will see the following

    [homes]
    comment = Home Directories
    browseable = no
    writable = yes

    This allows, for example, user joe to access his home directory from a windows machine or a Samba client.

    [tmp]
    comment = Temporary file space
    path = /tmp
    read only = no
    public = yes

    This allows access to /tmp directory in your Fedora machine from a windows machine or a Samba client.

    Here we will digress a little bit to see the difference between [homes] and [tmp]. The [homes] option allows the users to access their respective home directories in the Fedora box. They can only access their own directory and not any other user's directory. This is not of much help if people want to share files with one another. So [tmp] option allows all users to share files in /tmp directory.

    Save the file smb.conf and exit the editor.

    Now we can test if the configuration is correct by using testparm.

    [root@machinename samba]/usr/bin/testparm
    Load smb config files from /etc/samba/smb.conf
    Processing section "[homes]"
    Processing section "[printers]"
    Processing section "[tmp]"
    Loaded services file OK.
    Server role: ROLE_STANDALONE
    Press enter to see a dump of your service definitions

    Once you press enter, you should see something like this

    # Global parameters
    [global]
    workgroup = Myworkgroup
    server string = Machinename Samba Server
    username map = /etc/samba/smbusers
    log file = /var/log/samba/log.%m
    max log size = 50
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    dns proxy = No
    hosts allow = 192.168.1.

    [homes]
    comment = Home Directories
    read only = No
    browseable = No

    [printers]
    comment = All Printers
    path = /var/spool/samba
    printable = Yes
    browseable = No

    [tmp]
    comment = Temporary file space
    path = /tmp/
    read only = No
    guest ok = Yes

    This implies your configuration is ok and you are all set to start using Samba.You can also configure Samba so that members of a group can share files among themselves by using [groups] option in smb.conf file. This will be very helpful in an organization with different departments.


    Part 3: Using Samba

    Now that we have configured Samba, we can start using it. If you are upgrading from a previous version, you have to kill the Samba daemon (if it is running). To do this,

    [root@machinename samba]killall smbd
    [root@machinename samba]killall nmbd

    Now we can start Samba with our new configuration by

    [root@machinename samba]/usr/sbin/smbd -D
    [root@machinename samba]/usr/sbin/nmbd -D

    If you want to run Samba from xinetd instead, you can edit /etc/xinetd.conf and add the following lines

    service netbios-ns
    {
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    group = root
    server = /usr/sbin/nmbd
    }

    service netbios-ssn
    {
    socket_type = stream
    protocol = tcp
    wait = no
    user = root
    group = root
    server = /usr/sbin/smbd
    }

    Now we will test the Samba installation.

    To test the Samba installation, we use the Samba client we installed. The -L netbios name switch tells smbclient to get a list of shares from the server specified by netbios name. I use the -N switch to suppress the prompting for a password because it is not needed to see just the shares that are available.

    [root@machinename samba]# /usr/bin/smbclient -L localhost -N
    Anonymous login successful

    Sharename Type Comment
    --------- ---- -------
    tmp Disk Temporary file space
    IPC$ IPC IPC Service (Machinename Samba Server)
    ADMIN$ IPC IPC Service (Machinename Samba Server)
    Anonymous login successful

    Server Comment
    --------- -------
    Machinename Machinename Samba Server

    Workgroup Master
    --------- -------
    Myworkgroup Machinename

    The information given above may be different depending on your Samba configuration. The above example is based on the configuration file of a test machine. This is provided to give you an idea of what you will get when you try this. Having done this, we will now see how to use different clients to access Samba shares.

    A brief description of how to access Samba share from different clients are given below. This is by no means exhaustive and if you want detailed explanation, you can refer to various articles available on this subject.

    Windows 98
    Windows 98 has built-in support for TCP/IP. But this is not installed as the default. To add TCP/IP, go to `Control Panel' --> `System' and choose `Add' --> `Protocols' --> `TCP/IP from Microsoft'. Be sure to enter your network address and network mask correctly. Reboot your windows 98 machine and the Samba share will be available in the Network Neighborhood. To use a printer on the samba server, you should install the printer driver from the corresponding Windows version

    Windows 2000/XP

    To map a drive using the Windows GUI, click on My Computer. On the toolbar options, select Map Network Drive (under Windows XP this option is under the Tools menu). Once selected, a new box will open up. In the Drive box, click a drive letter that you wish to use. In the Folder box, type the path for the server and path that you wish to connect to and click finish.

    Alternately, you can use the following command from the command line

    NET USE G: \\Machinename\tmp /YES

    This will map the /tmp folder of your Fedora box to G drive.

    Mac OS X
    Make sure that SMB support is enabled in Directory Access Utility under Applications/Utilities. Activate Finder, select Go and then Connect to Server. In the server address field, type in the server address in one of the following formats.

    smb://ServerName/ShareName/
    smb://WORKGROUP@ServerName/ShareName
    smb://WORKGROUP;User@ServerName/ShareName

    Server address can be IP address or any valid DNS name. Please note that you will be unable to connect to any server that has a share name containing a hyphen or space in it. For spaces, you can try substituting a %20 in its place. After clicking Connect, you may be prompted for Authentication.

    Linux If you are planning to install Samba in your Fedora box only, you can skip this section. But if you are going to mount Samba shares from any other linux box, you may continue reading.

    Make sure that SAMBA_FS is compiled into your Kernel. If not, you will get the error message mount: fs type smbfs not supported by kernel when you try to mount the Samba share. If you get this message, recompile the kernel with SAMBA_FS. Now Samba must be installed in both the machines even if you are going to access Samba shares from only one machine. On your second machine, configure Samba with the --with-smbmount parameter. Using this option automatically creates the smbmount and smbumount commands along with the file /sbin/mount.smbfs (which is actually just a soft link to smbmount).

    Now you can mount the Samba share from your Fedora box by

    [root@machinename samba]# mount -t smbfs -o username=myusername,password=mypass //192.168.1.9/pub /mnt/sambamachinename

    Now you can access Samba shares from another linux machine.

    8o
     
  2. Anzeige

    Schau dir mal diese Kategorie an. Dort findest du bestimmt etwas.
    Registrieren bzw. einloggen, um diese und auch andere Anzeigen zu deaktivieren
  3. thorus

    thorus GNU-Freiheitskämpfer

    Dabei seit:
    03.11.2002
    Beiträge:
    757
    Zustimmungen:
    0
    Ort:
    Passau, Niederbayern
  4. #3 Bandit2004, 22.09.2004
    Bandit2004

    Bandit2004 Mitglied

    Dabei seit:
    20.09.2004
    Beiträge:
    26
    Zustimmungen:
    0
    ops, sorry Das wollte ich nicht, wenn so ist, dann lösche bitte alle drei Topics. Schade, aber was sonst.
     
  5. thorus

    thorus GNU-Freiheitskämpfer

    Dabei seit:
    03.11.2002
    Beiträge:
    757
    Zustimmungen:
    0
    Ort:
    Passau, Niederbayern
    Und hier bitte auch:
    Nein, das hier ist CC License.. schreib einfach den Autor, Quelle und die Lizenz dazu und fertig (ganz oben bei Quelle in deinem ersten Post).
    Ich hab dir die Links dazu jew. schon oben gepostet.
     
  6. #5 Bandit2004, 22.09.2004
    Bandit2004

    Bandit2004 Mitglied

    Dabei seit:
    20.09.2004
    Beiträge:
    26
    Zustimmungen:
    0
  7. #6 ichagx03, 10.10.2004
    ichagx03

    ichagx03 Eroberer

    Dabei seit:
    23.07.2004
    Beiträge:
    55
    Zustimmungen:
    0
    auf deutsch gibt es das nirgends ??
     
  8. Anzeige

    Vielleicht findest du HIER Antworten.
    Registrieren bzw. einloggen, um diese und auch andere Anzeigen zu deaktivieren
Thema:

FC2 Samba einrichten

Die Seite wird geladen...

FC2 Samba einrichten - Ähnliche Themen

  1. SAMBA für Windows10 Domäne einrichten

    SAMBA für Windows10 Domäne einrichten: Hallo, ich habe letztes Wochenende verzweifelt versucht, Samba auf meinem Server einzurichten, daher versuche ich aktuell meinen Fehler zu...
  2. Samba einrichten Suse

    Samba einrichten Suse: Hallo liebe Unixboardfreunde, ich bin neu hier und habe ein großes Problem und zwar: hat mir mein Chef die Aufgabe gegeben einen Samba - Server...
  3. Samba mit user login und user folder einrichten

    Samba mit user login und user folder einrichten: Hi leute ich habe bei mir ein Debian 5.0 (lenny) zu laufen samba ist auch schon installiert jedoch bekomme ich es nicht hin das samba so ein zu...
  4. Drucker einrichten mit CUPS und SAMBA

    Drucker einrichten mit CUPS und SAMBA: Saß gestern ganzen tag daran meinen drucker für die windows cients freizugeben über CUPS kann ich eine testseite drucken ich kann auch den...
  5. Cups und Samba einrichten?

    Cups und Samba einrichten?: Hallo zusammen, Ich hab Cups instaliert auch komplett eingerichtet und Samba, so jetzt möchte ich bei einer windows maschiene den drucker von...