Se protéger des fork Bomb

Bonjour,

Je cherche à me protéger des fork bomb.
J'ai trouvé ceci :

http://doc.ubuntu-fr.org/tutoriel/comment_se_proteger_des_fork_bomb

Seulement, lorsque j'édite limits.conf, rien ne se passe ( ulimit -u me renvoie unlimited).
Bon ... J'ai l'habitude que rien ne fonctionne du premier coup ...

Je case session required /lib/security/pam_limits.so

dans

*
/etc/pam.d/common-session
*
/etc/pam.d/login
*
/etc/pam.d/su
*
/etc/pam.d/xdm
*
/etc/pam.d/gdm
*
/etc/pam.d/sshd

Ainsi que UsePAM yes

Je redémarre le PC, et là je tape ulimit -u, le PC me renvoie unlimited au lieu de 100.

Quelqu'un pourrait m'aider à me protéger des fork bomb ? Ou me dire ce que j'ai loupé dans ma manip' ?

Merci d'avance,

Kévin.



--
°º¤ø,¸¸,ø¤º°'°º¤ø, c'est pas parce que la solution ne vous plait pas qu'il faut mettre -1, c'est juste quand elle est inutile qu'il faut en mettre. °º¤ø,¸¸,ø¤º°'°º¤ø,

4 réponses

  1. Je te donne ce lien qui me semble très intéressant et complet. Si ça ne suffit pas, hésite pas à revenir ici. Je suis le post.
    Sujet très intéressant.

    http://xhanch.com/web-server-limit-resource-usage-per-user-via-limits-conf/
    0
    1. J'essaie ce soir ...
      0
      1. alors ? quoi de neuf ?
        0
    2. Bonjour,

      Le plus simple aurait été de copier-coller ici ton fichier

      /etc/security/limits.conf

      0
      1. Le voici :

        # /etc/security/limits.conf
        #
        #Each line describes a limit for a user in the form:
        #
        #<domain> <type> <item> <value>
        #
        #Where:
        #<domain> can be:
        # - an user name
        # - a group name, with @group syntax
        # - the wildcard *, for default entry
        # - the wildcard %, can be also used with %group syntax,
        # for maxlogin limit
        # - NOTE: group and wildcard limits are not applied to root.
        # To apply a limit to the root user, <domain> must be
        # the literal username root.
        #
        #<type> can have the two values:
        # - "soft" for enforcing the soft limits
        # - "hard" for enforcing hard limits
        #
        #<item> can be one of the following:
        # - core - limits the core file size (KB)
        # - data - max data size (KB)
        # - fsize - maximum filesize (KB)
        # - memlock - max locked-in-memory address space (KB)
        # - nofile - max number of open files
        # - rss - max resident set size (KB)
        # - stack - max stack size (KB)
        # - cpu - max CPU time (MIN)
        # - nproc - max number of processes
        # - as - address space limit (KB)
        # - maxlogins - max number of logins for this user
        # - maxsyslogins - max number of logins on the system
        # - priority - the priority to run user process with
        # - locks - max number of file locks the user can hold
        # - sigpending - max number of pending signals
        # - msgqueue - max memory used by POSIX message queues (bytes)
        # - nice - max nice priority allowed to raise to values: [-20, 19]
        # - rtprio - max realtime priority
        # - chroot - change root to directory (Debian-specific)
        #
        #<domain> <type> <item> <value>
        #

        #* soft core 0
        #root hard core 100000
        #* hard rss 10000
        #@student hard nproc 20
        #@faculty soft nproc 20
        #@faculty hard nproc 50
        #ftp hard nproc 0
        #ftp - chroot /ftp
        #@student - maxlogins 4
        #* hard nproc 100
        # End of file
        1
        1. Contributeur
          Salut,

          En décommentant la ligne ça devrait le faire on ne peut mieux ;-\

          #* soft core 0
          #root hard core 100000
          #* hard rss 10000
          #@student hard nproc 20
          #@faculty soft nproc 20
          #@faculty hard nproc 50
          #ftp hard nproc 0
          #ftp - chroot /ftp
          #@student - maxlogins 4
          * hard nproc 100
          # End of file 
          0
        2. Pourquoi on retire le # ?
          0
        3. Contributeur
          Parce que sinon ce n'est pas pris en compte !
          C'est le principe même des dièses (#) qui servent à commenter les lignes afin d'y apposer un commentaire ou d'empêcher une ligne d'être prise en compte ;-))
          0