Loading ...
Sorry, an error occurred while loading the content.

Where did usermod go?

Expand Messages
  • bommeej
    I just acquired a NSLU2 and without a thought started hacking it. I have SlugOs running perfectly with a USB drive as the root file system. All was going
    Message 1 of 7 , Mar 28, 2009
    • 0 Attachment
      I just acquired a NSLU2 and without a thought started hacking it. I have SlugOs running perfectly with a USB drive as the root file system. All was going according to plan, until I went to install Samba (and wanted to add a group of users) when it became apparent there wasn't any usermod command.

      I have spent a good deal of time searching and am at a loss.

      I even gave the ole "hand bomb" a try and edited the /etc/groups file with no avail:

      root@SLUG:~# grep users /etc/group
      users:*:100:mike,bill,bob
      root@SLUG:~# groups bill
      bill : bill

      I noticed there are two */etc/groups files in the system, /initr/etc/groups and /etc/groups. What gives?

      Any help would be appreciated.
    • Mike (mwester)
      ... /initrd is the internal flash filesystem, and once you have done the turnup , it is used only momentarily during early boot. So it would be unusual to
      Message 2 of 7 , Mar 28, 2009
      • 0 Attachment
        bommeej wrote:
        > I just acquired a NSLU2 and without a thought started hacking it. I have SlugOs running perfectly with a USB drive as the root file system. All was going according to plan, until I went to install Samba (and wanted to add a group of users) when it became apparent there wasn't any usermod command.
        >
        > I have spent a good deal of time searching and am at a loss.

        :-) Try some other similar commands: adduser and deluser work.

        > I even gave the ole "hand bomb" a try and edited the /etc/groups file with no avail:
        >
        > root@SLUG:~# grep users /etc/group
        > users:*:100:mike,bill,bob
        > root@SLUG:~# groups bill
        > bill : bill
        >
        > I noticed there are two */etc/groups files in the system, /initr/etc/groups and /etc/groups. What gives?

        /initrd is the internal flash filesystem, and once you have done the
        "turnup", it is used only momentarily during early boot. So it would be
        unusual to use the groups and passwd files on /initrd for a normal,
        running system.

        > Any help would be appreciated.

        Just run "adduser" (the tinylogin version) or "busybox adduser" (for the
        busybox version) -- either should work.

        Mike (mwester)
      • bommeej
        ... Yes, adduser and deluser work, however unless I am mistaken they can t be used to add an existing user to a group. I would have to delete the user first
        Message 3 of 7 , Mar 28, 2009
        • 0 Attachment
          --- In nslu2-linux@yahoogroups.com, "Mike (mwester)" <mwester@...> wrote:
          >
          > bommeej wrote:
          > > I just acquired a NSLU2 and without a thought started hacking it. I have SlugOs running perfectly with a USB drive as the root file system. All was going according to plan, until I went to install Samba (and wanted to add a group of users) when it became apparent there wasn't any usermod command.
          > >
          > > I have spent a good deal of time searching and am at a loss.
          >
          > :-) Try some other similar commands: adduser and deluser work.

          Yes, adduser and deluser work, however unless I am mistaken they can't be used to add an existing user to a group. I would have to delete the user first and then re-create the account. That a bit of a kluge...

          >
          > > I even gave the ole "hand bomb" a try and edited the /etc/groups file with no avail:
          > >
          > > root@SLUG:~# grep users /etc/group
          > > users:*:100:mike,bill,bob
          > > root@SLUG:~# groups bill
          > > bill : bill
          > >
          > > I noticed there are two */etc/groups files in the system, /initr/etc/groups and /etc/groups. What gives?
          >
          > /initrd is the internal flash filesystem, and once you have done the
          > "turnup", it is used only momentarily during early boot. So it would be
          > unusual to use the groups and passwd files on /initrd for a normal,
          > running system.
          >
          > > Any help would be appreciated.
          >
          > Just run "adduser" (the tinylogin version) or "busybox adduser" (for the
          > busybox version) -- either should work.
          >
          > Mike (mwester)
          >
        • Mike (mwester)
          ... Oh, *that s* what you want to do. Sorry, I missed that. Do: busybox addgroup Or edit the /etc/group file. ... Not sure where the
          Message 4 of 7 , Mar 28, 2009
          • 0 Attachment
            bommeej wrote:
            > --- In nslu2-linux@yahoogroups.com, "Mike (mwester)" <mwester@...> wrote:
            >> bommeej wrote:
            >>> I just acquired a NSLU2 and without a thought started hacking it. I have SlugOs running perfectly with a USB drive as the root file system. All was going according to plan, until I went to install Samba (and wanted to add a group of users) when it became apparent there wasn't any usermod command.
            >>>
            >>> I have spent a good deal of time searching and am at a loss.
            >> :-) Try some other similar commands: adduser and deluser work.
            >
            > Yes, adduser and deluser work, however unless I am mistaken they can't be used to add an existing user to a group. I would have to delete the user first and then re-create the account. That a bit of a kluge...

            Oh, *that's* what you want to do. Sorry, I missed that. Do:

            busybox addgroup <username> <groupname>

            Or edit the /etc/group file.

            >>> I even gave the ole "hand bomb" a try and edited the /etc/groups file with no avail:
            >>>
            >>> root@SLUG:~# grep users /etc/group
            >>> users:*:100:mike,bill,bob
            >>> root@SLUG:~# groups bill
            >>> bill : bill

            Not sure where the group command came from -- what package is that?

            Login as the user in question, and use the "id" command to see what
            groups you are a member of.

            Also note that if you have a multi-user machine, and are using any
            busybox utilities, you'll get a lot of messages about "falling back".
            These are really quite annoying. You can shut busybox up by simply (as
            root):

            touch /etc/busybox.conf
            chmod 644 /etc/busybox.conf
            chown 0.0 /etc/busybox.conf

            (the last two lines are precautionary; they just establish the tight
            security constraints required by busybox for this feature).

            ((for those curious, this is a feature of busybox that hasn't yet been
            fully enabled; you can read about it at the busybox website and if it
            would be useful, let us know -- we'll keep it for the next release then,
            otherwise it might just be removed.))

            Mike (mwester)
          • jl.050877@gmail.com
            ... Did you try re-booting? After editing /etc/group by hand, I sometimes find that logging out and logging back in is sufficient to propagate the new
            Message 5 of 7 , Mar 28, 2009
            • 0 Attachment
              On Sat, Mar 28, 2009 at 05:03:12PM -0000, bommeej wrote:
              > root@SLUG:~# grep users /etc/group
              > users:*:100:mike,bill,bob
              > root@SLUG:~# groups bill
              > bill : bill

              Did you try re-booting?

              After editing /etc/group by hand, I sometimes find that logging out
              and logging back in is sufficient to propagate the new information.
              But, sometimes, a reboot is needed for everything to update.

              John
            • bommeej
              ... Yeah...not effect. Starting to wonder if a diversion script is required for SlugOS/BE to make this work...
              Message 6 of 7 , Apr 1 10:06 AM
              • 0 Attachment
                --- In nslu2-linux@yahoogroups.com, jl.050877@... wrote:
                >
                > On Sat, Mar 28, 2009 at 05:03:12PM -0000, bommeej wrote:
                > > root@SLUG:~# grep users /etc/group
                > > users:*:100:mike,bill,bob
                > > root@SLUG:~# groups bill
                > > bill : bill
                >
                > Did you try re-booting?
                >
                > After editing /etc/group by hand, I sometimes find that logging out
                > and logging back in is sufficient to propagate the new information.
                > But, sometimes, a reboot is needed for everything to update.
                >
                > John
                >


                Yeah...not effect. Starting to wonder if a diversion script is required for SlugOS/BE to make this work...
              • Mike (mwester)
                ... Is this still not working? Did you try the suggestions I sent earlier? Diversion scripts are for Unslung, in order to work around the Linksys startup
                Message 7 of 7 , Apr 1 8:52 PM
                • 0 Attachment
                  bommeej wrote:
                  > --- In nslu2-linux@yahoogroups.com, jl.050877@... wrote:
                  >> On Sat, Mar 28, 2009 at 05:03:12PM -0000, bommeej wrote:
                  >>> root@SLUG:~# grep users /etc/group
                  >>> users:*:100:mike,bill,bob
                  >>> root@SLUG:~# groups bill
                  >>> bill : bill
                  >> Did you try re-booting?
                  >>
                  >> After editing /etc/group by hand, I sometimes find that logging out
                  >> and logging back in is sufficient to propagate the new information.
                  >> But, sometimes, a reboot is needed for everything to update.
                  >>
                  >> John
                  >>
                  >
                  >
                  > Yeah...not effect. Starting to wonder if a diversion script is required for SlugOS/BE to make this work...

                  Is this still not working? Did you try the suggestions I sent earlier?

                  Diversion scripts are for Unslung, in order to work around the Linksys
                  startup sequence and their tools. SlugOS is a standard Linux system;
                  diversion scripts are completely unnecessary, and in fact there's
                  nothing to divert.

                  Tinylogin is what is reading the passwd and group files at login; it's
                  not a very feature-rich program, but tinylogin has been around for a
                  long time, and it's known to work just fine -- and reading a passwd and
                  group file is pretty basic.

                  So, that means that in all probability, your group file is damaged --
                  open it in a proper text editor, and check it for funky characters (like
                  MSDOS line endings), and proper structure.

                  If the group file is not damaged, then the question would be how do you
                  know it's not working? I don't think you've ever mentioned how you have
                  determined that -- what is it that is not working correctly for you, and
                  does that same thing work correctly on another Linux system?

                  Regards,
                  Mike (mwester)
                Your message has been successfully submitted and would be delivered to recipients shortly.