Why does groupmems command ask for a password even when executed as rootWhat was superuser password set?sudo...

Would it take any sort of amendment to make DC a state?

Why don't short runways use ramps for takeoff?

Why did some Apollo missions carry a grenade launcher?

Should 2FA be enabled on service accounts?

"Valet parking " or "parking valet"

Prepare a user to perform an action before proceeding to the next step

Why tantalum for the Hayabusa bullets?

May a hotel provide accommodation for fewer people than booked?

Should students have access to past exams or an exam bank?

Create two random teams from a list of players

How does Asimov's second law deal with contradictory orders from different people?

How to efficiently shred a lot of cabbage?

Did Vladimir Lenin have a cat?

Unknown indication below upper stave

Is it unprofessional to mention your cover letter and resume are best viewed in Chrome?

Why did Windows 95 crash the whole system but newer Windows only crashed programs?

What force enables us to walk? Friction or normal reaction?

How do you deal with characters with multiple races?

Can machine learning learn a function like finding maximum from a list?

Is it possible to tell if a child will turn into a Hag?

Does Ubuntu reduce battery life?

Raindrops in Python

How can I convert a linear narrative into a branching narrative?

What would the United Kingdom's "optimal" Brexit deal look like?



Why does groupmems command ask for a password even when executed as root


What was superuser password set?sudo command executes without prompting for passwordWhy is root in wheel and operator? Can root being in a group ever make a difference?Why is gksu asking me for root password and not my password?Why does reboot and poweroff require root privileges?Does a group created using `groupadd` have a default password?How can I automate adding a new user, using an existing user's groups?Is a process with effective or real uid being root still subject to permission bits of a file when accessing the file?Gparted and Synaptic ask for root password instead of mineUbuntu 16.04 root password suddenly not working(even after resetting)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















The groupmems command that allows us to edit group membership has a peculiar trait: When executed as root, it again asks for root password when trying to edit any group membership for any system user.



In fact it even acts for the root password pre-emptively, before it checks if such group exists (it checks if user exists before it asks for password)



If you for example execute groupmems -g 12345 -a nobody as root it will ask you to type in the root password anyway, before letting you know that group 12345 does not exist.



Why ( and actually how too) is it done this way for this specific command, given the omnipotence of root when it comes to passwd /etc/sudoers and well...everything else.



Also, this part taken straight from the man groupmems




The groupmems command allows a user to administer their own group membership list without the requirement of superuser privileges. The groupmems utility is for systems that
configure its users to be in their own name sake primary group (i.e., guest / guest).



Only the superuser, as administrator, can use groupmems to alter the memberships of other groups.




makes me wonder what would happen if I removed root from group root. Would root then possibly lose privileges to add himself back to group root with groupmems? ( I didn't want to attempt this not yet knowing how this groupmems command behaves



When I tried to read up on it and groups using man I eventually got to this interesting tidbit:




The /etc/group file is a text file that defines the groups on the system. There is one entry per line, with the following format:



group_name:password:GID:user_list




I have personally never set a password for a group in linux. What would it do/accomplish/help? When would it ever be asked instead of user's password given particualar privileges ? Would then every user's password that belongs to that particular group work as the group password also?



One last thing from the man group and this one we can at least laugh about:




As the 4.2BSD initgroups(3) man page says: no one seems to keep /etc/group up-to-date.











share|improve this question































    0















    The groupmems command that allows us to edit group membership has a peculiar trait: When executed as root, it again asks for root password when trying to edit any group membership for any system user.



    In fact it even acts for the root password pre-emptively, before it checks if such group exists (it checks if user exists before it asks for password)



    If you for example execute groupmems -g 12345 -a nobody as root it will ask you to type in the root password anyway, before letting you know that group 12345 does not exist.



    Why ( and actually how too) is it done this way for this specific command, given the omnipotence of root when it comes to passwd /etc/sudoers and well...everything else.



    Also, this part taken straight from the man groupmems




    The groupmems command allows a user to administer their own group membership list without the requirement of superuser privileges. The groupmems utility is for systems that
    configure its users to be in their own name sake primary group (i.e., guest / guest).



    Only the superuser, as administrator, can use groupmems to alter the memberships of other groups.




    makes me wonder what would happen if I removed root from group root. Would root then possibly lose privileges to add himself back to group root with groupmems? ( I didn't want to attempt this not yet knowing how this groupmems command behaves



    When I tried to read up on it and groups using man I eventually got to this interesting tidbit:




    The /etc/group file is a text file that defines the groups on the system. There is one entry per line, with the following format:



    group_name:password:GID:user_list




    I have personally never set a password for a group in linux. What would it do/accomplish/help? When would it ever be asked instead of user's password given particualar privileges ? Would then every user's password that belongs to that particular group work as the group password also?



    One last thing from the man group and this one we can at least laugh about:




    As the 4.2BSD initgroups(3) man page says: no one seems to keep /etc/group up-to-date.











    share|improve this question



























      0












      0








      0








      The groupmems command that allows us to edit group membership has a peculiar trait: When executed as root, it again asks for root password when trying to edit any group membership for any system user.



      In fact it even acts for the root password pre-emptively, before it checks if such group exists (it checks if user exists before it asks for password)



      If you for example execute groupmems -g 12345 -a nobody as root it will ask you to type in the root password anyway, before letting you know that group 12345 does not exist.



      Why ( and actually how too) is it done this way for this specific command, given the omnipotence of root when it comes to passwd /etc/sudoers and well...everything else.



      Also, this part taken straight from the man groupmems




      The groupmems command allows a user to administer their own group membership list without the requirement of superuser privileges. The groupmems utility is for systems that
      configure its users to be in their own name sake primary group (i.e., guest / guest).



      Only the superuser, as administrator, can use groupmems to alter the memberships of other groups.




      makes me wonder what would happen if I removed root from group root. Would root then possibly lose privileges to add himself back to group root with groupmems? ( I didn't want to attempt this not yet knowing how this groupmems command behaves



      When I tried to read up on it and groups using man I eventually got to this interesting tidbit:




      The /etc/group file is a text file that defines the groups on the system. There is one entry per line, with the following format:



      group_name:password:GID:user_list




      I have personally never set a password for a group in linux. What would it do/accomplish/help? When would it ever be asked instead of user's password given particualar privileges ? Would then every user's password that belongs to that particular group work as the group password also?



      One last thing from the man group and this one we can at least laugh about:




      As the 4.2BSD initgroups(3) man page says: no one seems to keep /etc/group up-to-date.











      share|improve this question














      The groupmems command that allows us to edit group membership has a peculiar trait: When executed as root, it again asks for root password when trying to edit any group membership for any system user.



      In fact it even acts for the root password pre-emptively, before it checks if such group exists (it checks if user exists before it asks for password)



      If you for example execute groupmems -g 12345 -a nobody as root it will ask you to type in the root password anyway, before letting you know that group 12345 does not exist.



      Why ( and actually how too) is it done this way for this specific command, given the omnipotence of root when it comes to passwd /etc/sudoers and well...everything else.



      Also, this part taken straight from the man groupmems




      The groupmems command allows a user to administer their own group membership list without the requirement of superuser privileges. The groupmems utility is for systems that
      configure its users to be in their own name sake primary group (i.e., guest / guest).



      Only the superuser, as administrator, can use groupmems to alter the memberships of other groups.




      makes me wonder what would happen if I removed root from group root. Would root then possibly lose privileges to add himself back to group root with groupmems? ( I didn't want to attempt this not yet knowing how this groupmems command behaves



      When I tried to read up on it and groups using man I eventually got to this interesting tidbit:




      The /etc/group file is a text file that defines the groups on the system. There is one entry per line, with the following format:



      group_name:password:GID:user_list




      I have personally never set a password for a group in linux. What would it do/accomplish/help? When would it ever be asked instead of user's password given particualar privileges ? Would then every user's password that belongs to that particular group work as the group password also?



      One last thing from the man group and this one we can at least laugh about:




      As the 4.2BSD initgroups(3) man page says: no one seems to keep /etc/group up-to-date.








      root group privileges cgroups






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 33 mins ago









      BarBar1234BarBar1234

      1495 bronze badges




      1495 bronze badges

























          0






          active

          oldest

          votes














          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          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%2f533260%2fwhy-does-groupmems-command-ask-for-a-password-even-when-executed-as-root%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f533260%2fwhy-does-groupmems-command-ask-for-a-password-even-when-executed-as-root%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...