Announcement

Collapse
No announcement yet.

Adding A User - Error - Unable To Lock Password File (Solved)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adding A User - Error - Unable To Lock Password File (Solved)

    I have just installed MySecureShell and I'm trying to add a user by following the directions on this page:
    http://howtoforge.com/mysecureshell_sftp_debian_etch

    The installation went great with no errors. However, when I try to a add user I get an error as shown below when I tried to add user "mike"

    mrmsu@closet:~$ useradd -m -s /bin/MySecureShell mike
    useradd: unable to lock password file
    Apparently, I have an issue locking a password file. I do not know what this means. I would appreciate any help.

    Thanks!

    Mike
    sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

    #2
    Re: Adding A User - Error - Unable To Lock Password File

    Preface the command with sudo Adding users requires root privileges.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Adding A User - Error - Unable To Lock Password File

      Originally posted by Snowhog
      Preface the command with sudo Adding users requires root privileges.
      I tried that as well. I got this as a result.
      mrmsu@closet:~$ sudo useradd -m -s /bin/MySecureShell mike
      sudo: unable to resolve host closet
      No other information was given.
      sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

      Comment


        #4
        Re: Adding A User - Error - Unable To Lock Password File

        By chance, are you having any issues using sudo for anything?
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: Adding A User - Error - Unable To Lock Password File

          Yes. All sudo commands are followed by "unable to resolve hosts". See below:

          mrmsu@closet:~$ sudo make me a pizza
          sudo: unable to resolve host closet
          I am still prompted for a password which is accepted when entered. the "unable to resolve host closet" message is new with 8.04 (never saw it in 7.10).

          Mike
          sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

          Comment


            #6
            Re: Adding A User - Error - Unable To Lock Password File

            Thought so. Open a console and cd to /etc and look at the hosts file:
            Code:
            pg hosts
            The first line will be the IP and localhost entry. There should be a second line with an IP and closet (your host) as the second entry. Most likely the second line is missing. If it is missing, then reboot into rescue mode (single user). At the prompt type:

            Code:
            cd /etc
            vi hosts
            Use your down arrow key and put the cursor below the first line, which should be:
            127.0.0.1 localhost
            Press the i key to enter insert mode
            Type:
            127.0.1.1 closet
            Press Esc to return to command mode
            :wq
            This will write the changes and quite.

            Type shutdown -r now to shutdown and reboot your system. Select your normal boot option. Open a console and try using sudo again. You should be back in business.
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Re: Adding A User - Error - Unable To Lock Password File

              By "Safe Mode" you mean "Recovery Mode" right? If so, I booted into recovery mode but it ended in a menu which stated:

              Resume Resume normal boot
              Root Drop to root shell prompt
              xfix Try to fix the x-server
              I chose "Root" and typed your commands but instead of IP addresses I get hexadecimal strings. What did I do wrong?

              Mike
              sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

              Comment


                #8
                Re: Adding A User - Error - Unable To Lock Password File

                Let's take a look at your hosts file. Open a console and type:
                Code:
                cat /etc/hosts
                Copy and paste into your reply.
                Windows no longer obstructs my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #9
                  Re: Adding A User - Error - Unable To Lock Password File

                  See below:

                  # The following lines are desirable for IPv6 capable hosts

                  # The following lines are desirable for IPv6 capable hosts
                  # (added automatically by netbase upgrade)


                  ::1 localhost ip6-localhost ip6-loopback
                  fe00::0 ip6-localnet
                  ff00::0 ip6-mcastprefix
                  ff02::1 ip6-allnodes
                  ff02::2 ip6-allrouters
                  ff02::3 ip6-allhosts
                  sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                  Comment


                    #10
                    Re: Adding A User - Error - Unable To Lock Password File

                    You are missing both required entries. Edit the /etc/hosts file as previously specified and add at the beginning the following two entries:

                    127.0.0.1 localhost
                    127.0.1.1 closet

                    So you end up with this:

                    127.0.0.1 localhost
                    127.0.1.1 closet

                    # The following lines are desirable for IPv6 capable hosts

                    # The following lines are desirable for IPv6 capable hosts
                    # (added automatically by netbase upgrade)


                    ::1 localhost ip6-localhost ip6-loopback
                    fe00::0 ip6-localnet
                    ff00::0 ip6-mcastprefix
                    ff02::1 ip6-allnodes
                    ff02::2 ip6-allrouters
                    ff02::3 ip6-allhosts
                    Windows no longer obstructs my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      Re: Adding A User - Error - Unable To Lock Password File (Solved)

                      That worked. All my users have been added and sudo seems to be working correctly again. Thanks again!

                      Mike
                      sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                      Comment


                        #12
                        Re: Adding A User - Error - Unable To Lock Password File (Solved)

                        Glad to have been able to help get you back in business.
                        Windows no longer obstructs my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment

                        Working...
                        X