How to sudo init 6 without passwd

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












In my /etc/sudoers.d/csinit, I had insert the following line, but still cannot work.



testcs ALL=NOPASSWD: /sbin/rc6, /sbin/rc5


I had tried this too:



testcs ALL=(ALL) NOPASSWD: /sbin/rc6, /sbin/rc5


It will still ask for passwd when I sudo init 6 or init 5.







share|improve this question


























    up vote
    0
    down vote

    favorite












    In my /etc/sudoers.d/csinit, I had insert the following line, but still cannot work.



    testcs ALL=NOPASSWD: /sbin/rc6, /sbin/rc5


    I had tried this too:



    testcs ALL=(ALL) NOPASSWD: /sbin/rc6, /sbin/rc5


    It will still ask for passwd when I sudo init 6 or init 5.







    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      In my /etc/sudoers.d/csinit, I had insert the following line, but still cannot work.



      testcs ALL=NOPASSWD: /sbin/rc6, /sbin/rc5


      I had tried this too:



      testcs ALL=(ALL) NOPASSWD: /sbin/rc6, /sbin/rc5


      It will still ask for passwd when I sudo init 6 or init 5.







      share|improve this question














      In my /etc/sudoers.d/csinit, I had insert the following line, but still cannot work.



      testcs ALL=NOPASSWD: /sbin/rc6, /sbin/rc5


      I had tried this too:



      testcs ALL=(ALL) NOPASSWD: /sbin/rc6, /sbin/rc5


      It will still ask for passwd when I sudo init 6 or init 5.









      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 15 at 6:37









      Olorin

      1,15711




      1,15711










      asked Mar 15 at 3:55









      user803473

      94




      94




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          You have set NOPASSWD for rc6 and rc5. If you don't want to be asked for a password for init, then you'll have to add those to the sudoers rule as well. Something like:



          testcs ALL=(ALL) NOPASSWD: /sbin/rc6, /sbin/rc5, /sbin/init [56]


          (Since you can specify wildcards in the arguments, [...] matching any character in the list.)






          share|improve this answer




















          • Yeah! It's work! Thank you so much. Do you know where is the command " ifconfig e1000g1 up" file location? I tried /sbin/ifconfig but the file is for ifconfig -a command only.
            – user803473
            Mar 15 at 7:05










          • @user803473 the same /sbin/ifconfig can be used for ifconfig ... up as well, as far as I know.
            – Olorin
            Mar 15 at 7:24










          • Since you seem to be new, you might want to consider accepting an answer if it worked for you. See unix.stackexchange.com/help/someone-answers
            – Olorin
            Mar 15 at 7:40










          • Okay, done :) Thanks for guiding.
            – user803473
            Mar 16 at 2:24










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430307%2fhow-to-sudo-init-6-without-passwd%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          You have set NOPASSWD for rc6 and rc5. If you don't want to be asked for a password for init, then you'll have to add those to the sudoers rule as well. Something like:



          testcs ALL=(ALL) NOPASSWD: /sbin/rc6, /sbin/rc5, /sbin/init [56]


          (Since you can specify wildcards in the arguments, [...] matching any character in the list.)






          share|improve this answer




















          • Yeah! It's work! Thank you so much. Do you know where is the command " ifconfig e1000g1 up" file location? I tried /sbin/ifconfig but the file is for ifconfig -a command only.
            – user803473
            Mar 15 at 7:05










          • @user803473 the same /sbin/ifconfig can be used for ifconfig ... up as well, as far as I know.
            – Olorin
            Mar 15 at 7:24










          • Since you seem to be new, you might want to consider accepting an answer if it worked for you. See unix.stackexchange.com/help/someone-answers
            – Olorin
            Mar 15 at 7:40










          • Okay, done :) Thanks for guiding.
            – user803473
            Mar 16 at 2:24














          up vote
          1
          down vote



          accepted










          You have set NOPASSWD for rc6 and rc5. If you don't want to be asked for a password for init, then you'll have to add those to the sudoers rule as well. Something like:



          testcs ALL=(ALL) NOPASSWD: /sbin/rc6, /sbin/rc5, /sbin/init [56]


          (Since you can specify wildcards in the arguments, [...] matching any character in the list.)






          share|improve this answer




















          • Yeah! It's work! Thank you so much. Do you know where is the command " ifconfig e1000g1 up" file location? I tried /sbin/ifconfig but the file is for ifconfig -a command only.
            – user803473
            Mar 15 at 7:05










          • @user803473 the same /sbin/ifconfig can be used for ifconfig ... up as well, as far as I know.
            – Olorin
            Mar 15 at 7:24










          • Since you seem to be new, you might want to consider accepting an answer if it worked for you. See unix.stackexchange.com/help/someone-answers
            – Olorin
            Mar 15 at 7:40










          • Okay, done :) Thanks for guiding.
            – user803473
            Mar 16 at 2:24












          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          You have set NOPASSWD for rc6 and rc5. If you don't want to be asked for a password for init, then you'll have to add those to the sudoers rule as well. Something like:



          testcs ALL=(ALL) NOPASSWD: /sbin/rc6, /sbin/rc5, /sbin/init [56]


          (Since you can specify wildcards in the arguments, [...] matching any character in the list.)






          share|improve this answer












          You have set NOPASSWD for rc6 and rc5. If you don't want to be asked for a password for init, then you'll have to add those to the sudoers rule as well. Something like:



          testcs ALL=(ALL) NOPASSWD: /sbin/rc6, /sbin/rc5, /sbin/init [56]


          (Since you can specify wildcards in the arguments, [...] matching any character in the list.)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 15 at 5:34









          Olorin

          1,15711




          1,15711











          • Yeah! It's work! Thank you so much. Do you know where is the command " ifconfig e1000g1 up" file location? I tried /sbin/ifconfig but the file is for ifconfig -a command only.
            – user803473
            Mar 15 at 7:05










          • @user803473 the same /sbin/ifconfig can be used for ifconfig ... up as well, as far as I know.
            – Olorin
            Mar 15 at 7:24










          • Since you seem to be new, you might want to consider accepting an answer if it worked for you. See unix.stackexchange.com/help/someone-answers
            – Olorin
            Mar 15 at 7:40










          • Okay, done :) Thanks for guiding.
            – user803473
            Mar 16 at 2:24
















          • Yeah! It's work! Thank you so much. Do you know where is the command " ifconfig e1000g1 up" file location? I tried /sbin/ifconfig but the file is for ifconfig -a command only.
            – user803473
            Mar 15 at 7:05










          • @user803473 the same /sbin/ifconfig can be used for ifconfig ... up as well, as far as I know.
            – Olorin
            Mar 15 at 7:24










          • Since you seem to be new, you might want to consider accepting an answer if it worked for you. See unix.stackexchange.com/help/someone-answers
            – Olorin
            Mar 15 at 7:40










          • Okay, done :) Thanks for guiding.
            – user803473
            Mar 16 at 2:24















          Yeah! It's work! Thank you so much. Do you know where is the command " ifconfig e1000g1 up" file location? I tried /sbin/ifconfig but the file is for ifconfig -a command only.
          – user803473
          Mar 15 at 7:05




          Yeah! It's work! Thank you so much. Do you know where is the command " ifconfig e1000g1 up" file location? I tried /sbin/ifconfig but the file is for ifconfig -a command only.
          – user803473
          Mar 15 at 7:05












          @user803473 the same /sbin/ifconfig can be used for ifconfig ... up as well, as far as I know.
          – Olorin
          Mar 15 at 7:24




          @user803473 the same /sbin/ifconfig can be used for ifconfig ... up as well, as far as I know.
          – Olorin
          Mar 15 at 7:24












          Since you seem to be new, you might want to consider accepting an answer if it worked for you. See unix.stackexchange.com/help/someone-answers
          – Olorin
          Mar 15 at 7:40




          Since you seem to be new, you might want to consider accepting an answer if it worked for you. See unix.stackexchange.com/help/someone-answers
          – Olorin
          Mar 15 at 7:40












          Okay, done :) Thanks for guiding.
          – user803473
          Mar 16 at 2:24




          Okay, done :) Thanks for guiding.
          – user803473
          Mar 16 at 2:24












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430307%2fhow-to-sudo-init-6-without-passwd%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay