+ Responder ao Tópico



  1. #1

    Padrão Ajuda Sshd - Erro Alguns Comandos

    Ola Pessoal, estou precisando de um help aqui no sshd.

    Tenho 3 servidore linux sendo 2 deles Red-Hat e um Conectiva. Nos Red-Hat estou passando por difuldades onde não estou conseguindo executar alguns comando s. Exempo regras de iptables - service - nslookp fica me aparecendo a mensagem abaixo de acesso negado. Configurei o sudo tambem mas ocorre a mesma mensagen?

    Alguem pdoeria me ajudar!!!

    [mezetti@srv-vpn etc]$ ./regras
    touch: creating `/var/lock/subsys/local': Permissão negada
    ./regras: line 16: modprobe: command not found
    ./regras: line 17: modprobe: command not found
    ./regras: line 18: modprobe: command not found
    ./regras: line 22: iptables: command not found
    ./regras: line 23: iptables: command not found
    ./regras: line 24: iptables: command not found
    ./regras: line 25: iptables: command not found
    ./regras: line 29: iptables: command not found
    ./regras: line 30: iptables: command not found
    ./regras: line 31: iptables: command not found
    ./regras: line 35: /proc/sys/net/ipv4/ip_forward: Permissão negada
    ./regras: line 38: /proc/sys/net/ipv4/icmp_echo_ignore_all: Permissão negada
    ./regras: line 41: /proc/sys/net/ipv4/tcp_syncookies: Permissão negada
    ./regras: line 44: /proc/sys/net/ipv4/tcp_syncookies: Permissão negada
    ./regras: line 45: iptables: command not found
    ./regras: line 48: iptables: command not found
    ./regras: line 51: iptables: command not found
    ./regras: line 54: iptables: command not found
    ./regras: line 57: iptables: command not found
    ./regras: line 60: iptables: command not found
    ./regras: line 61: iptables: command not found
    ./regras: line 62: iptables: command not found
    ./regras: line 63: iptables: command not found
    ./regras: line 64: iptables: command not found
    ./regras: line 65: iptables: command not found
    ./regras: line 66: iptables: command not found
    ./regras: line 67: iptables: command not found
    ./regras: line 68: iptables: command not found
    ./regras: line 69: iptables: command not found
    ./regras: line 70: iptables: command not found
    ./regras: line 71: iptables: command not found
    ./regras: line 75: iptables: command not found
    ./regras: line 76: iptables: command not found
    ./regras: line 77: iptables: command not found
    ./regras: line 78: iptables: command not found
    ./regras: line 79: iptables: command not found
    ./regras: line 80: iptables: command not found
    ./regras: line 81: iptables: command not found
    ./regras: line 82: iptables: command not found
    ./regras: line 83: iptables: command not found
    ./regras: line 84: iptables: command not found
    ./regras: line 85: iptables: command not found
    ./regras: line 86: iptables: command not found
    ./regras: line 89: iptables: command not found
    ./regras: line 90: iptables: command not found
    ./regras: line 92: iptables: command not found
    ./regras: line 93: iptables: command not found
    ./regras: line 96: iptables: command not found
    ./regras: line 97: iptables: command not found
    ./regras: line 100: iptables: command not found
    ./regras: line 101: iptables: command not found
    ./regras: line 102: iptables: command not found
    ./regras: line 103: iptables: command not found
    ./regras: line 106: iptables: command not found
    ./regras: line 107: iptables: command not found
    ./regras: line 148: service: command not found
    [mezetti@srv-vpn etc]$ sudo
    usage: sudo -V | -h | -L | -l | -v | -k | -K | [-H] [-P] [-S] [-b] [-p prompt]
    [-u username/#uid] -s | <command>
    [mezetti@srv-vpn etc]$ sudo /etc/regras

    We trust you have received the usual lecture from the local System
    Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

    Password:
    /etc/regras: line 16: modprobe: command not found
    /etc/regras: line 17: modprobe: command not found
    /etc/regras: line 18: modprobe: command not found
    /etc/regras: line 22: iptables: command not found
    /etc/regras: line 23: iptables: command not found
    /etc/regras: line 24: iptables: command not found
    /etc/regras: line 25: iptables: command not found
    /etc/regras: line 29: iptables: command not found
    /etc/regras: line 30: iptables: command not found
    /etc/regras: line 31: iptables: command not found
    /etc/regras: line 45: iptables: command not found
    /etc/regras: line 48: iptables: command not found
    /etc/regras: line 51: iptables: command not found
    /etc/regras: line 54: iptables: command not found
    /etc/regras: line 57: iptables: command not found
    /etc/regras: line 60: iptables: command not found
    /etc/regras: line 61: iptables: command not found
    /etc/regras: line 62: iptables: command not found
    /etc/regras: line 63: iptables: command not found
    /etc/regras: line 64: iptables: command not found
    /etc/regras: line 65: iptables: command not found
    /etc/regras: line 66: iptables: command not found
    /etc/regras: line 67: iptables: command not found
    /etc/regras: line 68: iptables: command not found
    /etc/regras: line 69: iptables: command not found
    /etc/regras: line 70: iptables: command not found
    /etc/regras: line 71: iptables: command not found
    /etc/regras: line 75: iptables: command not found
    /etc/regras: line 76: iptables: command not found
    /etc/regras: line 77: iptables: command not found
    /etc/regras: line 78: iptables: command not found
    /etc/regras: line 79: iptables: command not found
    /etc/regras: line 80: iptables: command not found
    /etc/regras: line 81: iptables: command not found
    /etc/regras: line 82: iptables: command not found
    /etc/regras: line 83: iptables: command not found
    /etc/regras: line 84: iptables: command not found
    /etc/regras: line 85: iptables: command not found
    /etc/regras: line 86: iptables: command not found
    /etc/regras: line 89: iptables: command not found
    /etc/regras: line 90: iptables: command not found
    /etc/regras: line 92: iptables: command not found
    /etc/regras: line 93: iptables: command not found
    /etc/regras: line 96: iptables: command not found
    /etc/regras: line 97: iptables: command not found
    /etc/regras: line 100: iptables: command not found
    /etc/regras: line 101: iptables: command not found
    /etc/regras: line 102: iptables: command not found
    /etc/regras: line 103: iptables: command not found
    /etc/regras: line 106: iptables: command not found
    /etc/regras: line 107: iptables: command not found
    /etc/regras: line 148: service: command not found
    [mezetti@srv-vpn etc]$

  2. #2

    Padrão

    Como tu tá executando esse comando? Como tá o seu arquivo sudoers? Como tá o seu script de firewall?

  3. #3

    Padrão

    Meu arquivo sudoers abaixo: e estou exexutando desta forma sudo /etc/regras e logo após me pede a senha do usuario , após adicioar a senha ocorre os erros.

    não consigo executar comandos tipo service - nslookup - dig - star regras do firewall.

    # sudoers file.
    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # See the sudoers man page for the details on how to write a sudoers file.
    #

    # Host alias specification

    # User alias specification

    # Cmnd alias specification

    # Defaults specification

    # User privilege specification
    root ALL=(ALL) ALL
    mezetti ALL=(ALL) ALL
    # Uncomment to allow people in group wheel to run all commands
    # %wheel ALL=(ALL) ALL

    # Same thing without a password
    # %wheel ALL=(ALL) NOPASSWD: ALL

    # Samples
    # %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
    # %users localhost=/sbin/shutdown -h now
    mezetti ALL=/etc/regras
    mezetti ALL=/etc/ssh/sshd_config
    mezetti ALL=/etc/named.conf
    mezetti ALL=/etc/postfix/main.cf
    mezetti ALL=/etc/resolv.conf
    mezetti ALL=/etc/sysconfig/network