user exists when trying to add user to systemd-journal group.

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











up vote
3
down vote

favorite
1












I have been wanting to read systemd-journal by running/using journalctl -b . Now if I run it as a user I get the following :-



$ journalctl -b
Hint: You are currently not seeing messages from other users and the system
Users in the 'systemd-journal' group can see all messages. Pass -q to
turn off this notice.
No journal files were opened due to insufficient permissions.


After this I ran a grep in /etc/group to see if such a group exists.



$ sudo grep systemd-journal /etc/group
systemd-journal:x:102:
systemd-journal-remote:x:128:


then I tried to add the user to that group :-



$ sudo useradd -G systemd-journal shirish
useradd: user 'shirish' already exists


You can see what it says.



I used the id command to find which groups shirish belongs to



$ id shirish
uid=1000(shirish) gid=1000(shirish) groups=1000(shirish),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev),110(lpadmin),113(scanner),119(bluetooth),131(kvm),132(libvirt)


As can be seen I do not shirish being member of systemd-journal. Am stumped.



Any guidance please.










share|improve this question

























    up vote
    3
    down vote

    favorite
    1












    I have been wanting to read systemd-journal by running/using journalctl -b . Now if I run it as a user I get the following :-



    $ journalctl -b
    Hint: You are currently not seeing messages from other users and the system
    Users in the 'systemd-journal' group can see all messages. Pass -q to
    turn off this notice.
    No journal files were opened due to insufficient permissions.


    After this I ran a grep in /etc/group to see if such a group exists.



    $ sudo grep systemd-journal /etc/group
    systemd-journal:x:102:
    systemd-journal-remote:x:128:


    then I tried to add the user to that group :-



    $ sudo useradd -G systemd-journal shirish
    useradd: user 'shirish' already exists


    You can see what it says.



    I used the id command to find which groups shirish belongs to



    $ id shirish
    uid=1000(shirish) gid=1000(shirish) groups=1000(shirish),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev),110(lpadmin),113(scanner),119(bluetooth),131(kvm),132(libvirt)


    As can be seen I do not shirish being member of systemd-journal. Am stumped.



    Any guidance please.










    share|improve this question























      up vote
      3
      down vote

      favorite
      1









      up vote
      3
      down vote

      favorite
      1






      1





      I have been wanting to read systemd-journal by running/using journalctl -b . Now if I run it as a user I get the following :-



      $ journalctl -b
      Hint: You are currently not seeing messages from other users and the system
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.
      No journal files were opened due to insufficient permissions.


      After this I ran a grep in /etc/group to see if such a group exists.



      $ sudo grep systemd-journal /etc/group
      systemd-journal:x:102:
      systemd-journal-remote:x:128:


      then I tried to add the user to that group :-



      $ sudo useradd -G systemd-journal shirish
      useradd: user 'shirish' already exists


      You can see what it says.



      I used the id command to find which groups shirish belongs to



      $ id shirish
      uid=1000(shirish) gid=1000(shirish) groups=1000(shirish),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev),110(lpadmin),113(scanner),119(bluetooth),131(kvm),132(libvirt)


      As can be seen I do not shirish being member of systemd-journal. Am stumped.



      Any guidance please.










      share|improve this question













      I have been wanting to read systemd-journal by running/using journalctl -b . Now if I run it as a user I get the following :-



      $ journalctl -b
      Hint: You are currently not seeing messages from other users and the system
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.
      No journal files were opened due to insufficient permissions.


      After this I ran a grep in /etc/group to see if such a group exists.



      $ sudo grep systemd-journal /etc/group
      systemd-journal:x:102:
      systemd-journal-remote:x:128:


      then I tried to add the user to that group :-



      $ sudo useradd -G systemd-journal shirish
      useradd: user 'shirish' already exists


      You can see what it says.



      I used the id command to find which groups shirish belongs to



      $ id shirish
      uid=1000(shirish) gid=1000(shirish) groups=1000(shirish),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev),110(lpadmin),113(scanner),119(bluetooth),131(kvm),132(libvirt)


      As can be seen I do not shirish being member of systemd-journal. Am stumped.



      Any guidance please.







      debian permissions users group mate






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 9 '15 at 21:17









      shirish

      3,33942474




      3,33942474




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          5
          down vote



          accepted










          You don't use useradd to add a user to a group. You use useradd to create a user, hence the error message. Try:



          # usermod -a -G systemd-journal shirish


          or



          # gpasswd -a shirish systemd-journal


          In either case, you need to log in again to make it take effect. A quick-and-dirty way of doing this in a running shell is:



          $ exec su - shirish





          share|improve this answer



























            up vote
            0
            down vote













            The command naming is confusing. You want:



            ´adduser shirish systemd-journal´



            instead of useradd. The adduser command might not be available on all linux flavors, but it is on debian.






            share|improve this answer




















              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%2f235116%2fuser-exists-when-trying-to-add-user-to-systemd-journal-group%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              5
              down vote



              accepted










              You don't use useradd to add a user to a group. You use useradd to create a user, hence the error message. Try:



              # usermod -a -G systemd-journal shirish


              or



              # gpasswd -a shirish systemd-journal


              In either case, you need to log in again to make it take effect. A quick-and-dirty way of doing this in a running shell is:



              $ exec su - shirish





              share|improve this answer
























                up vote
                5
                down vote



                accepted










                You don't use useradd to add a user to a group. You use useradd to create a user, hence the error message. Try:



                # usermod -a -G systemd-journal shirish


                or



                # gpasswd -a shirish systemd-journal


                In either case, you need to log in again to make it take effect. A quick-and-dirty way of doing this in a running shell is:



                $ exec su - shirish





                share|improve this answer






















                  up vote
                  5
                  down vote



                  accepted







                  up vote
                  5
                  down vote



                  accepted






                  You don't use useradd to add a user to a group. You use useradd to create a user, hence the error message. Try:



                  # usermod -a -G systemd-journal shirish


                  or



                  # gpasswd -a shirish systemd-journal


                  In either case, you need to log in again to make it take effect. A quick-and-dirty way of doing this in a running shell is:



                  $ exec su - shirish





                  share|improve this answer












                  You don't use useradd to add a user to a group. You use useradd to create a user, hence the error message. Try:



                  # usermod -a -G systemd-journal shirish


                  or



                  # gpasswd -a shirish systemd-journal


                  In either case, you need to log in again to make it take effect. A quick-and-dirty way of doing this in a running shell is:



                  $ exec su - shirish






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 9 '15 at 21:30









                  Tom Hunt

                  6,06521334




                  6,06521334






















                      up vote
                      0
                      down vote













                      The command naming is confusing. You want:



                      ´adduser shirish systemd-journal´



                      instead of useradd. The adduser command might not be available on all linux flavors, but it is on debian.






                      share|improve this answer
























                        up vote
                        0
                        down vote













                        The command naming is confusing. You want:



                        ´adduser shirish systemd-journal´



                        instead of useradd. The adduser command might not be available on all linux flavors, but it is on debian.






                        share|improve this answer






















                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          The command naming is confusing. You want:



                          ´adduser shirish systemd-journal´



                          instead of useradd. The adduser command might not be available on all linux flavors, but it is on debian.






                          share|improve this answer












                          The command naming is confusing. You want:



                          ´adduser shirish systemd-journal´



                          instead of useradd. The adduser command might not be available on all linux flavors, but it is on debian.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Oct 22 '17 at 9:20







                          user13666


































                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f235116%2fuser-exists-when-trying-to-add-user-to-systemd-journal-group%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              Peggy Mitchell

                              The Forum (Inglewood, California)

                              Palaiologos