IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Réseau Discussion :

Configuration SAMBA sous Debian


Sujet :

Réseau

  1. #1
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 820
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 820
    Points : 498 771
    Points
    498 771
    Par défaut Configuration SAMBA sous Debian
    J'ai quelques soucis avec la configuration de samba :
    1) Premier soucis, lorsque je fais un testparm smb.conf, voici le message que j'obtiens :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    Load smb config files from /etc/samba/smb.conf
    Can't find include file /etc/samba/dhcp.conf
    ....
    ....
    Je n'ai pas de dhcp.conf dans /etc/samba

    2) Lorsque je cree un repertoire partagé, voici comment je procéde :
    supposons que je veuille partager le repertoire stagiaires, alors je crée le groupe gstagiaires_w et gstagiaires_r
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    groupadd gstagiaires_w et groupadd gstagiaires_r
    creation du repertoire stagiaires
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    mkdir -p /home/stagiaires
    Permissions :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    chown root.gstagiaires_w /home/stagiaires
    chmod 0775 /home/stagiaires
    Ensuite dans /etc/group
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    gstagiaires_r:x:1159:jean,dabou,
    gstagiaires_w:x:1160:moi,toto
    Puis dans /etc/samba/smb.conf
    je rajoute
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
     
    [stagiaires]
        comment = reoertoire stagiaire
        path = /home/stagiaires
        browseable = YES
        writable = YES
        force create mode = 0775
        force directory mode = 0775
        valid users = @stagiaires_w,@stagiaires_r
        read list = @stagiaires_r
        write list = @stagiaires_w
        force group = stagiaires_w
    Ensuite creation des users unix, samba avec les mêmes mot de pass.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    adduser jean
    smbpasswd -a jean
    Quand les utilisateurs se connectent sur leur windows, ils voient bien le repertoire stagiaires avec leur repertoire (jean par ex), mais impossible d'ecrire dans leur repertoire jean, pourtant
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    ls -l /home/jean => 
    drwxr-xr-x   2 jean jean 4096 Jun  6 01:34 .
    drwxrwsr-x  13 root  staff 4096 Jun  6 01:36 ..
    -rw-r--r--   1 jean jean 567 Jun  6 01:34 .bash_profile
    -rw-r--r--   1 jean jean 1834 Jun  6 01:34 .bashrc
    Normalement, avant que mon serveur crash, dans chaque repertoire des utilisateurs, ils avaient leur repertoires profils avec toutes l'arbo windows (bureaux, etc) et ils pouvaient se connecter de bureau en bureau, maintenant c'est plus le cas et j'ai ce message :
    Windows ne peut pas trouver de copie serveur de votre profil itinérant et tente de vous ouvrir une session avec votre profil local. Les midifications apportées au profil ne seront pas copiées sur le serveur lorsque vous fermerez votre session. Les causes possible de cette erreur incluent des problèmes réseau ou des droits de sécuritées inssufisants. Si ce problème persiste, contactez votre administrateur réseau.
    En plus lorsque l'utilisateur est sur son repertoire sur windows (jean par ex) il voit les fichiers .viminfo, .bashrc alors que ce n'etait pas le cas avant

    Voilà, je sais plus quoi faire. Je vois sur des docs qu'il y a souvent un utilisateur samba, mais j'en ai pas créé, faut il le faire? je vois souvent aussi netlogon, c'est quoi? Comment configurer les profils?

    Help!!!


    Voici mon /etc/samba/smb.conf
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
     
    #
    # Sample configuration file for the Samba suite for Debian GNU/Linux.
    #
    #
    # This is the main Samba configuration file. You should read the
    # smb.conf(5) manual page in order to understand the options listed
    # here. Samba has a huge number of configurable options most of which 
    # are not shown in this example
    #
    # Any line which starts with a ; (semi-colon) or a # (hash) 
    # is a comment and is ignored. In this example we will use a #
    # for commentary and a ; for parts of the config file that you
    # may wish to enable
    #
    # NOTE: Whenever you modify this file you should run the command
    # "testparm" to check that you have not many any basic syntactic 
    # errors. 
    #
     
    #======================= Global Settings =======================
     
    [global]
     
    ## Browsing/Identification ###
     
    # Change this to the workgroup/NT-domain name your Samba server will part of
       workgroup = ******
     
    # server string is the equivalent of the NT Description field
       server string = %h server (Samba %v)
     
    # Windows Internet Name Serving Support Section:
    # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
    ;   wins support = no
     
    # WINS Server - Tells the NMBD components of Samba to be a WINS Client
    # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
    ;   wins server = w.x.y.z
     
    # If we receive WINS server info from DHCP, override the options above. 
       include = /etc/samba/dhcp.conf
     
    # This will prevent nmbd to search for NetBIOS names through DNS.
       dns proxy = no
     
    # What naming service and in what order should we use to resolve host names
    # to IP addresses
    ;   name resolve order = lmhosts host wins bcast
     
     
    #### Debugging/Accounting ####
     
    # This tells Samba to use a separate log file for each machine
    # that connects
       log file = /var/log/samba/log.%m
     
    # Put a capping on the size of the log files (in Kb).
       max log size = 1000
     
    # If you want Samba to only log through syslog then set the following
    # parameter to 'yes'.
    ;   syslog only = no
     
    # We want Samba to log a minimum amount of information to syslog. Everything
    # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
    # through syslog you should set the following parameter to something higher.
       syslog = 0
     
    # Do something sensible when Samba crashes: mail the admin a backtrace
       panic action = /usr/share/samba/panic-action %d
     
     
    ####### Authentication #######
     
    # "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/ServerType.html in the samba-doc
    # package for details.
    ;   security = user
     
    # You may wish to use password encryption.  See the section on
    # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
       encrypt passwords = true
     
    # If you are using encrypted passwords, Samba will need to know what
    # password database type you are using.  
       passdb backend = tdbsam guest
     
       obey pam restrictions = yes
     
    ;   guest account = nobody
       invalid users = root
     
    # This boolean parameter controls whether Samba attempts to sync the Unix
    # password with the SMB password when the encrypted SMB password in the
    # passdb is changed.
    ;   unix password sync = no
     
    # For Unix password sync to work on a Debian GNU/Linux system, the following
    # parameters must be set (thanks to Augustin Luton <aluton@hybrigenics.fr> for
    # sending the correct chat script for the passwd program in Debian Potato).
       passwd program = /usr/bin/passwd %u
       passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
     
    # This boolean controls whether PAM will be used for password changes
    # when requested by an SMB client instead of the program listed in
    # 'passwd program'. The default is 'no'.
    ;   pam password change = no
     
     
    ########## Printing ##########
     
    # If you want to automatically load your printer list rather
    # than setting them up individually then you'll need this
    ;   load printers = yes
     
    # lpr(ng) printing. You may wish to override the location of the
    # printcap file
    ;   printing = bsd
    ;   printcap name = /etc/printcap
     
    # CUPS printing.  See also the cupsaddsmb(8) manpage in the
    # cupsys-client package.
    ;   printing = cups
    ;   printcap name = cups
     
    # When using [print$], root is implicitly a 'printer admin', but you can
    # also give this right to other users to add drivers and set printer
    # properties
    ;   printer admin = @ntadmin
     
     
    ######## File sharing ########
     
    # Name mangling options
    ;   preserve case = yes
    ;   short preserve case = yes
     
     
    ############ Misc ############
     
    # Using the following line enables you to customise your configuration
    # on a per machine basis. The %m gets replaced with the netbios name
    # of the machine that is connecting
    ;   include = /home/samba/etc/smb.conf.%m
     
    # Most people will find that this option gives better performance.
    # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
    # for details
    # You may want to add the following on a Linux system:
    #         SO_RCVBUF=8192 SO_SNDBUF=8192
       socket options = TCP_NODELAY
     
    # The following parameter is useful only if you have the linpopup package
    # installed. The samba maintainer and the linpopup maintainer are
    # working to ease installation and configuration of linpopup and samba.
    ;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
     
    # Domain Master specifies Samba to be the Domain Master Browser. If this
    # machine will be configured as a BDC (a secondary logon server), you
    # must set this to 'no'; otherwise, the default behavior is recommended.
    ;   domain master = auto
     
    # Some defaults for winbind (make sure you're not using the ranges
    # for something else.)
    ;   idmap uid = 10000-20000
    ;   idmap gid = 10000-20000
    ;   template shell = /bin/bash
     
    #======================= Share Definitions =======================
    [profiles]
       comment = Homes windows
       path = /home/%U
       browseable = No
       read only = No
     
    [homes]
       comment = Home Directories
       browseable = no
     
    # By default, the home directories are exported read-only. Change next
    # parameter to 'yes' if you want to be able to write to them.
       writable = no
     
    # File creation mask is set to 0700 for security reasons. If you want to
    # create files with group=rw permissions, set next parameter to 0775.
       create mask = 0700
     
    # Directory creation mask is set to 0700 for security reasons. If you want to
    # create dirs. with group=rw permissions, set next parameter to 0775.
       directory mask = 0700
     
    # Répertoire utilisé par winNT,XP pour stocker les profils
    logon home = \\%L\profiles\%U 
     
    # Un-comment the following and create the netlogon directory for Domain Logons
    # (you need to configure Samba to act as a domain controller too.)
    ;[netlogon]
    ;   comment = Network Logon Service
    ;   path = /home/samba/netlogon
    ;   guest ok = yes
    ;   writable = no
    ;   share modes = no
     
    ;[printers]
    ;   comment = All Printers
    ;   browseable = no
    ;   path = /tmp
    ;   printable = yes
    ;   public = no
    ;   writable = no
    ;   create mode = 0700
     
    # Windows clients look for this share name as a source of downloadable
    # printer drivers
    ;[print$]
    ;   comment = Printer Drivers
    ;   path = /var/lib/samba/printers
    ;   browseable = yes
    ;   read only = yes
    ;   guest ok = no
    # Uncomment to allow remote administration of Windows print drivers.
    # Replace 'ntadmin' with the name of the group your admin users are
    # members of.
    ;   write list = root, @ntadmin
     
    # A sample share for sharing your CD-ROM with others.
    ;[cdrom]
    ;   comment = Samba server's CD-ROM
    ;   writable = no
    ;   locking = no
    ;   path = /cdrom
    ;   public = yes
     
    # The next two parameters show how to auto-mount a CD-ROM when the
    #	cdrom share is accesed. For this to work /etc/fstab must contain
    #	an entry like this:
    #
    #       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
    #
    # The CD-ROM gets unmounted automatically after the connection to the
    #
    # If you don't want to use auto-mounting/unmounting make sure the CD
    #	is mounted on /cdrom
    #
    ;   preexec = /bin/mount /cdrom
    ;   postexec = /bin/umount /cdrom
     
    [stagiaires]
        comment = reoertoire stagiaire
        path = /home/innova/stagiaires
        browseable = YES
        writable = YES
        force create mode = 0775
        force directory mode = 0775
        valid users = @stagiaires_w,@stagiaires_r
        read list = @stagiaires_r
        write list = @stagiaires_w
        force group = stagiaires_w
    help!

  2. #2
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 820
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 820
    Points : 498 771
    Points
    498 771
    Par défaut
    Pas d'idée ?

  3. #3
    Membre éprouvé
    Profil pro
    Inscrit en
    Mai 2004
    Messages
    792
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Mai 2004
    Messages : 792
    Points : 1 206
    Points
    1 206
    Par défaut
    Il me semble que ton niveau de sécurité security=user est commenté.

    Essaye de le décommenter pour voir.

  4. #4
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 820
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 820
    Points : 498 771
    Points
    498 771
    Par défaut
    Citation Envoyé par ripat
    Il me semble que ton niveau de sécurité security=user est commenté.

    Essaye de le décommenter pour voir.
    c'est fait, mais ça change rien

  5. #5
    Membre éprouvé
    Profil pro
    Inscrit en
    Mai 2004
    Messages
    792
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Mai 2004
    Messages : 792
    Points : 1 206
    Points
    1 206
    Par défaut
    Pour ton problème de /etc/samba/dhcp.conf, tu es sûr que tu as besoin de la ligne:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    include = /etc/samba/dhcp.conf

  6. #6
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 820
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 820
    Points : 498 771
    Points
    498 771
    Par défaut
    Citation Envoyé par ripat
    Pour ton problème de /etc/samba/dhcp.conf, tu es sûr que tu as besoin de la ligne:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    include = /etc/samba/dhcp.conf
    Il me l'a mis tout seul apres le apt-get install (qd j'ai repondu à ces questions).
    qd je l'enleve, je n'ai plus ce message d'erreur, mais mes soucis sont toujours là!

  7. #7
    Membre éprouvé
    Profil pro
    Inscrit en
    Mai 2004
    Messages
    792
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Mai 2004
    Messages : 792
    Points : 1 206
    Points
    1 206
    Par défaut
    Dans :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
       valid users = @stagiaires_w,@stagiaires_r
       read list = @stagiaires_r
       write list = @stagiaires_w
       force group = stagiaires_w
    Essaye de remplacer @stagiaires_x par le noms des users, pour voir.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
       valid users = moi, toi, lui
        read list = moi,toi,lui
        write list = moi,toi,lui
        force group = moi,toi,lui

  8. #8
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 820
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 820
    Points : 498 771
    Points
    498 771
    Par défaut
    le probleme n'est pas l'acces aux repertoires partagés.
    En fait quand l'utilsateur se connecte au serveur ou est installé samba (via un click sur l'image), il voit tous les repertoires partagés ainsi que son repertoire perso avec pour nom son login (ex : jean) et c'est dans ce repertoire qu'il y a probleme. Probleme de droit d'ecriture (portant j'ai fait chown jean:jean), pas de repertoire profil crée, .bashrc qui apparait.

  9. #9
    Membre éprouvé
    Profil pro
    Inscrit en
    Mai 2004
    Messages
    792
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Mai 2004
    Messages : 792
    Points : 1 206
    Points
    1 206
    Par défaut
    Perso, je commencerais avec un smb.conf de base, pas trop optimisé, après tu pourras resserrer. Par exemple:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    [global]
        workgroup = xxxxxxxxxx
        server string = Debian server
        security = SHARE
        guest account = samba
        # log pour voir ce qui se passe (utile dans cette phase)
        # tu peux aller jusqu'à 10
        log level = 3
        log file = /var/log/samba.log
     
    [stagiaires]
        comment = reoertoire stagiaire
        path = /home/stagiaires
        browseable = YES
        writable = YES
        force create mode = 0775
        force directory mode = 0775
        valid users =  moi, toi, lui

  10. #10
    Membre à l'essai
    Inscrit en
    Avril 2006
    Messages
    61
    Détails du profil
    Informations forums :
    Inscription : Avril 2006
    Messages : 61
    Points : 24
    Points
    24
    Par défaut
    Salut, y a surement un truc à faire avec chown . Je me rappel plus de la commande exact je croi chown nomutilisateur, verifie avant, mais j'avais eu le même problème.

    Cordialement.

  11. #11
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 820
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 820
    Points : 498 771
    Points
    498 771
    Par défaut
    bon j'ai déjà résolu un premier souci :
    les utilisateurs peuvent maintenant ecrire dans leur repertoire perso.
    fallait modifier dans le fichier de conf de samba la partie [homes]. Par defaut, c'est ecrit writable = no forcément, ça peut pas fonctionner

    je continue à creuser pour le reste

Discussions similaires

  1. Configuration Postfix sous Debian etch
    Par KurL dans le forum Applications et environnements graphiques
    Réponses: 2
    Dernier message: 15/03/2009, 14h51
  2. Configuration Tomcat sous debian
    Par debiancrash dans le forum Tomcat et TomEE
    Réponses: 1
    Dernier message: 27/12/2006, 11h18
  3. Problème de configuration proftpd sous Debian
    Par jejerome dans le forum Réseau
    Réponses: 5
    Dernier message: 06/06/2006, 23h25
  4. Configurer Xorg sous Debian
    Par Thrystan dans le forum Applications et environnements graphiques
    Réponses: 1
    Dernier message: 24/03/2006, 08h09
  5. Graveur cd/dvd sur serveur Samba sous debian
    Par Jackdev dans le forum Matériel
    Réponses: 4
    Dernier message: 08/03/2006, 14h59

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo