Program indítás root jogokkal

Kezdőlap Fórumok UHU Linux Általános UHU problémák, javaslatok Program indítás root jogokkal

10 bejegyzés megtekintése - 11-20 / 26
  • Szerző
    Bejegyzés
  • #1982151
    zehyo
    Felhasználó

      átírtam, de még így sem megy vmiért 🙁 Mit kéne beírnom abba a fájlba? mert a sudo… parancssal nem megy 🙁

      #1982152
      Kistukesz
      Felhasználó

        átírtam, de még így sem megy vmiért 🙁 Mit kéne beírnom abba a fájlba? mert a sudo… parancssal nem megy 🙁
        [align=right][snapback]95260[/snapback][/align]


        # 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
        ##
        # Net banda
        ##
        User_Alias NET=zsolt #Igy a zsolt is indithatja es leallithatja az ad
        sl-t.

        # Cmnd alias specification
        ##
        # Parancs aliasok
        ##
        #
        #Cmnd_Alias SHUTDOWN=/sbin/shutdown
        #Cmnd_Alias HALT=/sbin/halt,/sbin/hardhalt
        #Cmnd_Alias REBOOT=/sbin/reboot,/sbin/hardreboot
        Cmnd_Alias ADSL=/usr/sbin/adsl-start,/usr/sbin/adsl-stop

        # Defaults specification

        # User privilege specification
        root 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

        # ADSL kapcsolat bandája.
        #
        NET ALL=NOPASSWD:ADSL


        Természetesen a zsolt helyére a te felhasználónevedet (akár többet is) írd be.
        Ezután hozz létre egy indítóikont az alábbi indítóparancsra:
        sudo /usr/sbin/adsl-start (- az ikon neve tetszõleges pl. ADSL kapcsolat létesítése)
        és mégegyet
        sudo /usr/sbin/adsl-stop (név pl.: ADSL kapcsolat megszüntetése)

        #1982153
        lacix
        Felhasználó

          Hello!

          A legegyszerûbb az, hogy a fájl jogokat szerkezted. Azt hiszem setuid root jogot kell adni neki.

          #1982154
          admin
          Adminisztrátor

            mert akkor valamiért hülyül a valknutom…de miért, bootkor hogy tudnám elindítani?
            [align=right][snapback]94720[/snapback][/align]

            Az /etc/runlevels/custom könyvtárba helyezz el egy pl: (tuzfal.service) fájlt, a könyvtárba található help, hogyan.
            Az indítási sorrendekkel ki tudod szürni mikor induljon, hogy menjen az a valknut valami is.

            #1982155
            zehyo
            Felhasználó

              # 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
              ##
              # Net banda                                                               
              ## 
              User_Alias      NET=zsolt      #Igy a zsolt is indithatja es leallithatja az ad
              sl-t.

              # Cmnd alias specification
              ##                                                                           
              # Parancs aliasok                                                         
              ##                                                                       
              #   
              #Cmnd_Alias    SHUTDOWN=/sbin/shutdown                           
              #Cmnd_Alias    HALT=/sbin/halt,/sbin/hardhalt                           
              #Cmnd_Alias    REBOOT=/sbin/reboot,/sbin/hardreboot                 
              Cmnd_Alias      ADSL=/usr/sbin/adsl-start,/usr/sbin/adsl-stop

              # Defaults specification

              # User privilege specification
              root    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

              # ADSL kapcsolat bandája.                                                 
              #   
              NET    ALL=NOPASSWD:ADSL


              Természetesen a zsolt helyére a te felhasználónevedet (akár többet is) írd be.
              Ezután hozz létre egy indítóikont az alábbi indítóparancsra:
              sudo /usr/sbin/adsl-start (- az ikon neve tetszõleges pl. ADSL kapcsolat létesítése)
              és mégegyet
              sudo /usr/sbin/adsl-stop (név pl.: ADSL kapcsolat megszüntetése)
              [align=right][snapback]95603[/snapback][/align]

              No, kicsit megint foglalkoztam a dologgal, de valahogy nem megy…
              A mintádra a sudoers file:

              Code:
              # 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
              User_Alias NET=zenta
              User_Alias NET=martin

              # Cmnd alias specification
              Cmnd_Alias TUZFAL=”/sbin/shorewall start”

              # Defaults specification

              # User privilege specification
              root 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
              NET ALL=NOPASSWD:TUZFAL

              #1982156
              Bbt
              Felhasználó

                A hibaüzenet pedig:

                Code:
                >>> sudoers file: syntax error, line 14 <<< sudo: parse error in /etc/sudoers near line 14

                Az a baj, h nem nagyon értek ehhez 🙁
                [align=right][snapback]96900[/snapback][/align]

                a syntax error oka szerintem az idézõjel a PATH két végén a 14.ik sorban…

                #1982157
                zehyo
                Felhasználó

                  a syntax error oka szerintem az idézõjel a PATH két végén a 14.ik sorban…
                  [align=right][snapback]96991[/snapback][/align]

                  Node akkor hogy csináljam, ha szóröz van benne?
                  Vagy a startot hagyjam el, mert ugye az csak paraméter..node akkor meg hogy indítok?

                  #1982158
                  pomm
                  Felhasználó

                    így sem jó:

                    # 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

                    # 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 ALL=sbin/shorewall start

                    #1982159
                    csablak
                    Felhasználó

                      Bár nekem nincs uhu-m de shorewallt azt használok.
                      Ha azt szeretnéd, hogy a valknut menjen is, akkor a shorewallnak add meg a 9176-os portot mind tcp, mind udp-ként.
                      Ekkor lehetsz aktiv a valknuttal, és még a tûzfalad is megy.
                      A shorewall meg igenis induljon el automatikusan a boot-oláskor.

                      #1982160
                      zehyo
                      Felhasználó

                        Bár nekem nincs uhu-m de shorewallt azt használok.
                        Ha azt szeretnéd, hogy a valknut menjen is, akkor a shorewallnak add meg a 9176-os portot mind tcp, mind udp-ként.
                        Ekkor lehetsz aktiv a valknuttal, és még a tûzfalad is megy.
                        A shorewall meg igenis induljon el automatikusan a boot-oláskor.
                        [align=right][snapback]97053[/snapback][/align]

                        Ertem, koszonom szepen 🙂
                        Akkor az ebben a topicban leirtak szerint meginditom bootolaskor, es engedelyezem a portot (remelem ez menni fog, bar ugy remlik, h amikor belottem, akkor letiltottam vmi portot, majd gondolom menni fog az engedelyezes 🙂

                      10 bejegyzés megtekintése - 11-20 / 26
                      • Be kell jelentkezni a hozzászóláshoz.