How do I disable login of user?what does `adduser --disabled-login` do?How do I execute a command on login for a system user with no home folder and no personal .bashrc file?Ubuntu 14.04 login into desktop by single user modeCan use Password authentication with SFTP even though “PasswordAuthentication no” in /etc/ssh/sshd_configunlock login gnome-keyring on i3wm autologinSetting up users for ubuntu for ssh connectionSuspend on level of login, not workstation - possible issue in multiuser system (Ubuntu, Mint)User specific commandsUbuntu 16.04 - Cannot SSH with root user, login successfully but closed immediately with return code 254?Can't login anymore onto my Ubuntu serverUbuntu 16.04 root password suddenly not working(even after resetting)

How was Daenerys able to legitimise this character?

If a (distance) metric on a connected Riemannian manifold locally agrees with the Riemannian metric, is it equal to the induced metric?

Are black holes spherical during merger?

“For nothing” = “pour rien”?

How to cut a climbing rope?

When playing Edgar Markov, what is the definition of a "Vampire spell"?

What is the use case for non-breathable waterproof pants?

How to patch glass cuts in a bicycle tire?

Mercedes C180 (W204) dash symbol

Is there a simple example that empirical evidence is misleading?

Why do Russians almost not use verbs of possession akin to "have"?

Does French have the English "short i" vowel?

Is there a single word meaning "the thing that attracts me"?

Why was this character made Grand Maester?

What's difference between "depends on" and "is blocked by" relations between issues in Jira next-gen board?

How does the Earth's center produce heat?

Why is unzipped directory exactly 4.0k (much smaller than zipped file)?

Why are GND pads often only connected by four traces?

Why A=2 and B=1 in the call signs for Spirit and Opportunity?

Shorten or merge multiple lines of `&> /dev/null &`

How to melt snow without fire or body heat?

What could a self-sustaining lunar colony slowly lose that would ultimately prove fatal?

Are runways booked by airlines to land their planes?

Is it legal to have an abortion in another state or abroad?



How do I disable login of user?


what does `adduser --disabled-login` do?How do I execute a command on login for a system user with no home folder and no personal .bashrc file?Ubuntu 14.04 login into desktop by single user modeCan use Password authentication with SFTP even though “PasswordAuthentication no” in /etc/ssh/sshd_configunlock login gnome-keyring on i3wm autologinSetting up users for ubuntu for ssh connectionSuspend on level of login, not workstation - possible issue in multiuser system (Ubuntu, Mint)User specific commandsUbuntu 16.04 - Cannot SSH with root user, login successfully but closed immediately with return code 254?Can't login anymore onto my Ubuntu serverUbuntu 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;








3















I made a user once with the --disabled-login command. I then had to change the password so I could login to the user and test some stuff. I do now want to disable the login again, and I saw this post:
what does `adduser --disabled-login` do?



So I used sudo passwd user and then set it to !. However, when I tried to login I could login using the password !. So how do I disable it again?



Note that I also tried * as password.










share|improve this question






























    3















    I made a user once with the --disabled-login command. I then had to change the password so I could login to the user and test some stuff. I do now want to disable the login again, and I saw this post:
    what does `adduser --disabled-login` do?



    So I used sudo passwd user and then set it to !. However, when I tried to login I could login using the password !. So how do I disable it again?



    Note that I also tried * as password.










    share|improve this question


























      3












      3








      3








      I made a user once with the --disabled-login command. I then had to change the password so I could login to the user and test some stuff. I do now want to disable the login again, and I saw this post:
      what does `adduser --disabled-login` do?



      So I used sudo passwd user and then set it to !. However, when I tried to login I could login using the password !. So how do I disable it again?



      Note that I also tried * as password.










      share|improve this question
















      I made a user once with the --disabled-login command. I then had to change the password so I could login to the user and test some stuff. I do now want to disable the login again, and I saw this post:
      what does `adduser --disabled-login` do?



      So I used sudo passwd user and then set it to !. However, when I tried to login I could login using the password !. So how do I disable it again?



      Note that I also tried * as password.







      ubuntu






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 7 hours ago









      SPAWN35

      157




      157










      asked 9 hours ago









      Jesper.LindbergJesper.Lindberg

      425




      425




















          3 Answers
          3






          active

          oldest

          votes


















          5














          I think that your confusion stems from the fact you don't understand what ! does.



          Encrypted passwords are stored in /etc/shadow. For example, after
          creating a new user named new-user and giving it 12345678 password
          we get this entry:



          $ sudo cat /etc/shadow
          (...)
          new-user:$6$zVbJcpZE$Bqnxr5cDkwjKOE06iAZu7/qIuH9UGXex28TU/aD0osft9DfdPVzcVwq2j410YxoPlZR310.heZyxaQq4iwWy9.:18038:0:99999:7:::


          You can now switch to new-user by doing su new-user and typing
          12345678 as the password. You can disable a password for
          new-user by prepending it with ! like that:



          $ sudo cat /etc/shadow
          (...)
          new-user:!$6$zVbJcpZE$Bqnxr5cDkwjKOE06iAZu7/qIuH9UGXex28TU/aD0osft9DfdPVzcVwq2j410YxoPlZR310.heZyxaQq4iwWy9.:18038:0:99999:7:::


          From now on you will not be able to switch to new-user even after
          providing the correct password:



          $ su new-user
          Password:
          su: Authentication failure


          Notice though that modifying /etc/shadow manually is very dangerous
          and not recommended. You can achieve the same with sudo passwd -l new-user. As man passwd says:




           -l, --lock
          Lock the password of the named account. This option
          disables a password by changing it to a value which matches
          no possible encrypted value (it adds a ´!´ at the beginning
          of the password).



          For example:



          $ sudo passwd -l new-user
          passwd: password expiry information changed.


          However, notice that passwd -l does not disable the account, it
          only disables password and that means that user can still log in the
          system using other methods as man passwd explains:




           Note that this does not disable the account. The user may
          still be able to login using another authentication token
          (e.g. an SSH key). To disable the account, administrators
          should use usermod --expiredate 1 (this set the account's
          expire date to Jan 2, 1970).

          Users with a locked password are not allowed to change
          their password.






          share|improve this answer

























          • The problem when I lock the account is that services that uses that account are no longer working?

            – Jesper.Lindberg
            7 hours ago











          • You didn't really locked the account, you just disabled logging with password for this account. What is more, this is a normal security practice on Linux and other Unix-based systems to have multiple accounts with password disabled and shells set to /bin/false so that each daemon can be run on the behalf of different user. How exactly do you check that services that uses that account you've just modified are no longer working?

            – Arkadiusz Drabczyk
            6 hours ago












          • I can no longer connect to any of the services used by the user. If I use passwd -u user again, the services works after reboot. I solved this by sudo adduser --disabled-login test-user and then manually editing /etc/shadow and copy paste w/e was after test-user and put it after the user I wanted to disable. That is I just removed the hash after !

            – Jesper.Lindberg
            2 hours ago











          • I don't know what you mean. Are the services you're talking about no longer running, that is you cannot see them in output of ps aux?

            – Arkadiusz Drabczyk
            2 hours ago











          • Future investigation showed that it is just 1 service that do not work this way and where I have to manually remove the hash after ! in shadow. Not sure why this specific service do not work but I have a solution that do work so thanks for the help :)

            – Jesper.Lindberg
            1 hour ago


















          1














          Looks like you misunderstood what's going on when there is a * or ! as the "password value" in /etc/shadow. You can't achieve this by actually changing your password to a single-character * or !. Such single-character values are the result of locking the user account with commands such as usermod -L.



          If you want to know more, please read : Exclamation marks and asterisks in the password field.






          share|improve this answer






























            0














            You're looking for usermod --lock.






            share|improve this answer


















            • 1





              Now all the services that used the account are no longer running.

              – Jesper.Lindberg
              8 hours ago











            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%2f520368%2fhow-do-i-disable-login-of-user%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            5














            I think that your confusion stems from the fact you don't understand what ! does.



            Encrypted passwords are stored in /etc/shadow. For example, after
            creating a new user named new-user and giving it 12345678 password
            we get this entry:



            $ sudo cat /etc/shadow
            (...)
            new-user:$6$zVbJcpZE$Bqnxr5cDkwjKOE06iAZu7/qIuH9UGXex28TU/aD0osft9DfdPVzcVwq2j410YxoPlZR310.heZyxaQq4iwWy9.:18038:0:99999:7:::


            You can now switch to new-user by doing su new-user and typing
            12345678 as the password. You can disable a password for
            new-user by prepending it with ! like that:



            $ sudo cat /etc/shadow
            (...)
            new-user:!$6$zVbJcpZE$Bqnxr5cDkwjKOE06iAZu7/qIuH9UGXex28TU/aD0osft9DfdPVzcVwq2j410YxoPlZR310.heZyxaQq4iwWy9.:18038:0:99999:7:::


            From now on you will not be able to switch to new-user even after
            providing the correct password:



            $ su new-user
            Password:
            su: Authentication failure


            Notice though that modifying /etc/shadow manually is very dangerous
            and not recommended. You can achieve the same with sudo passwd -l new-user. As man passwd says:




             -l, --lock
            Lock the password of the named account. This option
            disables a password by changing it to a value which matches
            no possible encrypted value (it adds a ´!´ at the beginning
            of the password).



            For example:



            $ sudo passwd -l new-user
            passwd: password expiry information changed.


            However, notice that passwd -l does not disable the account, it
            only disables password and that means that user can still log in the
            system using other methods as man passwd explains:




             Note that this does not disable the account. The user may
            still be able to login using another authentication token
            (e.g. an SSH key). To disable the account, administrators
            should use usermod --expiredate 1 (this set the account's
            expire date to Jan 2, 1970).

            Users with a locked password are not allowed to change
            their password.






            share|improve this answer

























            • The problem when I lock the account is that services that uses that account are no longer working?

              – Jesper.Lindberg
              7 hours ago











            • You didn't really locked the account, you just disabled logging with password for this account. What is more, this is a normal security practice on Linux and other Unix-based systems to have multiple accounts with password disabled and shells set to /bin/false so that each daemon can be run on the behalf of different user. How exactly do you check that services that uses that account you've just modified are no longer working?

              – Arkadiusz Drabczyk
              6 hours ago












            • I can no longer connect to any of the services used by the user. If I use passwd -u user again, the services works after reboot. I solved this by sudo adduser --disabled-login test-user and then manually editing /etc/shadow and copy paste w/e was after test-user and put it after the user I wanted to disable. That is I just removed the hash after !

              – Jesper.Lindberg
              2 hours ago











            • I don't know what you mean. Are the services you're talking about no longer running, that is you cannot see them in output of ps aux?

              – Arkadiusz Drabczyk
              2 hours ago











            • Future investigation showed that it is just 1 service that do not work this way and where I have to manually remove the hash after ! in shadow. Not sure why this specific service do not work but I have a solution that do work so thanks for the help :)

              – Jesper.Lindberg
              1 hour ago















            5














            I think that your confusion stems from the fact you don't understand what ! does.



            Encrypted passwords are stored in /etc/shadow. For example, after
            creating a new user named new-user and giving it 12345678 password
            we get this entry:



            $ sudo cat /etc/shadow
            (...)
            new-user:$6$zVbJcpZE$Bqnxr5cDkwjKOE06iAZu7/qIuH9UGXex28TU/aD0osft9DfdPVzcVwq2j410YxoPlZR310.heZyxaQq4iwWy9.:18038:0:99999:7:::


            You can now switch to new-user by doing su new-user and typing
            12345678 as the password. You can disable a password for
            new-user by prepending it with ! like that:



            $ sudo cat /etc/shadow
            (...)
            new-user:!$6$zVbJcpZE$Bqnxr5cDkwjKOE06iAZu7/qIuH9UGXex28TU/aD0osft9DfdPVzcVwq2j410YxoPlZR310.heZyxaQq4iwWy9.:18038:0:99999:7:::


            From now on you will not be able to switch to new-user even after
            providing the correct password:



            $ su new-user
            Password:
            su: Authentication failure


            Notice though that modifying /etc/shadow manually is very dangerous
            and not recommended. You can achieve the same with sudo passwd -l new-user. As man passwd says:




             -l, --lock
            Lock the password of the named account. This option
            disables a password by changing it to a value which matches
            no possible encrypted value (it adds a ´!´ at the beginning
            of the password).



            For example:



            $ sudo passwd -l new-user
            passwd: password expiry information changed.


            However, notice that passwd -l does not disable the account, it
            only disables password and that means that user can still log in the
            system using other methods as man passwd explains:




             Note that this does not disable the account. The user may
            still be able to login using another authentication token
            (e.g. an SSH key). To disable the account, administrators
            should use usermod --expiredate 1 (this set the account's
            expire date to Jan 2, 1970).

            Users with a locked password are not allowed to change
            their password.






            share|improve this answer

























            • The problem when I lock the account is that services that uses that account are no longer working?

              – Jesper.Lindberg
              7 hours ago











            • You didn't really locked the account, you just disabled logging with password for this account. What is more, this is a normal security practice on Linux and other Unix-based systems to have multiple accounts with password disabled and shells set to /bin/false so that each daemon can be run on the behalf of different user. How exactly do you check that services that uses that account you've just modified are no longer working?

              – Arkadiusz Drabczyk
              6 hours ago












            • I can no longer connect to any of the services used by the user. If I use passwd -u user again, the services works after reboot. I solved this by sudo adduser --disabled-login test-user and then manually editing /etc/shadow and copy paste w/e was after test-user and put it after the user I wanted to disable. That is I just removed the hash after !

              – Jesper.Lindberg
              2 hours ago











            • I don't know what you mean. Are the services you're talking about no longer running, that is you cannot see them in output of ps aux?

              – Arkadiusz Drabczyk
              2 hours ago











            • Future investigation showed that it is just 1 service that do not work this way and where I have to manually remove the hash after ! in shadow. Not sure why this specific service do not work but I have a solution that do work so thanks for the help :)

              – Jesper.Lindberg
              1 hour ago













            5












            5








            5







            I think that your confusion stems from the fact you don't understand what ! does.



            Encrypted passwords are stored in /etc/shadow. For example, after
            creating a new user named new-user and giving it 12345678 password
            we get this entry:



            $ sudo cat /etc/shadow
            (...)
            new-user:$6$zVbJcpZE$Bqnxr5cDkwjKOE06iAZu7/qIuH9UGXex28TU/aD0osft9DfdPVzcVwq2j410YxoPlZR310.heZyxaQq4iwWy9.:18038:0:99999:7:::


            You can now switch to new-user by doing su new-user and typing
            12345678 as the password. You can disable a password for
            new-user by prepending it with ! like that:



            $ sudo cat /etc/shadow
            (...)
            new-user:!$6$zVbJcpZE$Bqnxr5cDkwjKOE06iAZu7/qIuH9UGXex28TU/aD0osft9DfdPVzcVwq2j410YxoPlZR310.heZyxaQq4iwWy9.:18038:0:99999:7:::


            From now on you will not be able to switch to new-user even after
            providing the correct password:



            $ su new-user
            Password:
            su: Authentication failure


            Notice though that modifying /etc/shadow manually is very dangerous
            and not recommended. You can achieve the same with sudo passwd -l new-user. As man passwd says:




             -l, --lock
            Lock the password of the named account. This option
            disables a password by changing it to a value which matches
            no possible encrypted value (it adds a ´!´ at the beginning
            of the password).



            For example:



            $ sudo passwd -l new-user
            passwd: password expiry information changed.


            However, notice that passwd -l does not disable the account, it
            only disables password and that means that user can still log in the
            system using other methods as man passwd explains:




             Note that this does not disable the account. The user may
            still be able to login using another authentication token
            (e.g. an SSH key). To disable the account, administrators
            should use usermod --expiredate 1 (this set the account's
            expire date to Jan 2, 1970).

            Users with a locked password are not allowed to change
            their password.






            share|improve this answer















            I think that your confusion stems from the fact you don't understand what ! does.



            Encrypted passwords are stored in /etc/shadow. For example, after
            creating a new user named new-user and giving it 12345678 password
            we get this entry:



            $ sudo cat /etc/shadow
            (...)
            new-user:$6$zVbJcpZE$Bqnxr5cDkwjKOE06iAZu7/qIuH9UGXex28TU/aD0osft9DfdPVzcVwq2j410YxoPlZR310.heZyxaQq4iwWy9.:18038:0:99999:7:::


            You can now switch to new-user by doing su new-user and typing
            12345678 as the password. You can disable a password for
            new-user by prepending it with ! like that:



            $ sudo cat /etc/shadow
            (...)
            new-user:!$6$zVbJcpZE$Bqnxr5cDkwjKOE06iAZu7/qIuH9UGXex28TU/aD0osft9DfdPVzcVwq2j410YxoPlZR310.heZyxaQq4iwWy9.:18038:0:99999:7:::


            From now on you will not be able to switch to new-user even after
            providing the correct password:



            $ su new-user
            Password:
            su: Authentication failure


            Notice though that modifying /etc/shadow manually is very dangerous
            and not recommended. You can achieve the same with sudo passwd -l new-user. As man passwd says:




             -l, --lock
            Lock the password of the named account. This option
            disables a password by changing it to a value which matches
            no possible encrypted value (it adds a ´!´ at the beginning
            of the password).



            For example:



            $ sudo passwd -l new-user
            passwd: password expiry information changed.


            However, notice that passwd -l does not disable the account, it
            only disables password and that means that user can still log in the
            system using other methods as man passwd explains:




             Note that this does not disable the account. The user may
            still be able to login using another authentication token
            (e.g. an SSH key). To disable the account, administrators
            should use usermod --expiredate 1 (this set the account's
            expire date to Jan 2, 1970).

            Users with a locked password are not allowed to change
            their password.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 6 hours ago

























            answered 8 hours ago









            Arkadiusz DrabczykArkadiusz Drabczyk

            8,51021836




            8,51021836












            • The problem when I lock the account is that services that uses that account are no longer working?

              – Jesper.Lindberg
              7 hours ago











            • You didn't really locked the account, you just disabled logging with password for this account. What is more, this is a normal security practice on Linux and other Unix-based systems to have multiple accounts with password disabled and shells set to /bin/false so that each daemon can be run on the behalf of different user. How exactly do you check that services that uses that account you've just modified are no longer working?

              – Arkadiusz Drabczyk
              6 hours ago












            • I can no longer connect to any of the services used by the user. If I use passwd -u user again, the services works after reboot. I solved this by sudo adduser --disabled-login test-user and then manually editing /etc/shadow and copy paste w/e was after test-user and put it after the user I wanted to disable. That is I just removed the hash after !

              – Jesper.Lindberg
              2 hours ago











            • I don't know what you mean. Are the services you're talking about no longer running, that is you cannot see them in output of ps aux?

              – Arkadiusz Drabczyk
              2 hours ago











            • Future investigation showed that it is just 1 service that do not work this way and where I have to manually remove the hash after ! in shadow. Not sure why this specific service do not work but I have a solution that do work so thanks for the help :)

              – Jesper.Lindberg
              1 hour ago

















            • The problem when I lock the account is that services that uses that account are no longer working?

              – Jesper.Lindberg
              7 hours ago











            • You didn't really locked the account, you just disabled logging with password for this account. What is more, this is a normal security practice on Linux and other Unix-based systems to have multiple accounts with password disabled and shells set to /bin/false so that each daemon can be run on the behalf of different user. How exactly do you check that services that uses that account you've just modified are no longer working?

              – Arkadiusz Drabczyk
              6 hours ago












            • I can no longer connect to any of the services used by the user. If I use passwd -u user again, the services works after reboot. I solved this by sudo adduser --disabled-login test-user and then manually editing /etc/shadow and copy paste w/e was after test-user and put it after the user I wanted to disable. That is I just removed the hash after !

              – Jesper.Lindberg
              2 hours ago











            • I don't know what you mean. Are the services you're talking about no longer running, that is you cannot see them in output of ps aux?

              – Arkadiusz Drabczyk
              2 hours ago











            • Future investigation showed that it is just 1 service that do not work this way and where I have to manually remove the hash after ! in shadow. Not sure why this specific service do not work but I have a solution that do work so thanks for the help :)

              – Jesper.Lindberg
              1 hour ago
















            The problem when I lock the account is that services that uses that account are no longer working?

            – Jesper.Lindberg
            7 hours ago





            The problem when I lock the account is that services that uses that account are no longer working?

            – Jesper.Lindberg
            7 hours ago













            You didn't really locked the account, you just disabled logging with password for this account. What is more, this is a normal security practice on Linux and other Unix-based systems to have multiple accounts with password disabled and shells set to /bin/false so that each daemon can be run on the behalf of different user. How exactly do you check that services that uses that account you've just modified are no longer working?

            – Arkadiusz Drabczyk
            6 hours ago






            You didn't really locked the account, you just disabled logging with password for this account. What is more, this is a normal security practice on Linux and other Unix-based systems to have multiple accounts with password disabled and shells set to /bin/false so that each daemon can be run on the behalf of different user. How exactly do you check that services that uses that account you've just modified are no longer working?

            – Arkadiusz Drabczyk
            6 hours ago














            I can no longer connect to any of the services used by the user. If I use passwd -u user again, the services works after reboot. I solved this by sudo adduser --disabled-login test-user and then manually editing /etc/shadow and copy paste w/e was after test-user and put it after the user I wanted to disable. That is I just removed the hash after !

            – Jesper.Lindberg
            2 hours ago





            I can no longer connect to any of the services used by the user. If I use passwd -u user again, the services works after reboot. I solved this by sudo adduser --disabled-login test-user and then manually editing /etc/shadow and copy paste w/e was after test-user and put it after the user I wanted to disable. That is I just removed the hash after !

            – Jesper.Lindberg
            2 hours ago













            I don't know what you mean. Are the services you're talking about no longer running, that is you cannot see them in output of ps aux?

            – Arkadiusz Drabczyk
            2 hours ago





            I don't know what you mean. Are the services you're talking about no longer running, that is you cannot see them in output of ps aux?

            – Arkadiusz Drabczyk
            2 hours ago













            Future investigation showed that it is just 1 service that do not work this way and where I have to manually remove the hash after ! in shadow. Not sure why this specific service do not work but I have a solution that do work so thanks for the help :)

            – Jesper.Lindberg
            1 hour ago





            Future investigation showed that it is just 1 service that do not work this way and where I have to manually remove the hash after ! in shadow. Not sure why this specific service do not work but I have a solution that do work so thanks for the help :)

            – Jesper.Lindberg
            1 hour ago













            1














            Looks like you misunderstood what's going on when there is a * or ! as the "password value" in /etc/shadow. You can't achieve this by actually changing your password to a single-character * or !. Such single-character values are the result of locking the user account with commands such as usermod -L.



            If you want to know more, please read : Exclamation marks and asterisks in the password field.






            share|improve this answer



























              1














              Looks like you misunderstood what's going on when there is a * or ! as the "password value" in /etc/shadow. You can't achieve this by actually changing your password to a single-character * or !. Such single-character values are the result of locking the user account with commands such as usermod -L.



              If you want to know more, please read : Exclamation marks and asterisks in the password field.






              share|improve this answer

























                1












                1








                1







                Looks like you misunderstood what's going on when there is a * or ! as the "password value" in /etc/shadow. You can't achieve this by actually changing your password to a single-character * or !. Such single-character values are the result of locking the user account with commands such as usermod -L.



                If you want to know more, please read : Exclamation marks and asterisks in the password field.






                share|improve this answer













                Looks like you misunderstood what's going on when there is a * or ! as the "password value" in /etc/shadow. You can't achieve this by actually changing your password to a single-character * or !. Such single-character values are the result of locking the user account with commands such as usermod -L.



                If you want to know more, please read : Exclamation marks and asterisks in the password field.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 8 hours ago









                HttqmHttqm

                570210




                570210





















                    0














                    You're looking for usermod --lock.






                    share|improve this answer


















                    • 1





                      Now all the services that used the account are no longer running.

                      – Jesper.Lindberg
                      8 hours ago















                    0














                    You're looking for usermod --lock.






                    share|improve this answer


















                    • 1





                      Now all the services that used the account are no longer running.

                      – Jesper.Lindberg
                      8 hours ago













                    0












                    0








                    0







                    You're looking for usermod --lock.






                    share|improve this answer













                    You're looking for usermod --lock.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 9 hours ago









                    Warren YoungWarren Young

                    56.7k11144149




                    56.7k11144149







                    • 1





                      Now all the services that used the account are no longer running.

                      – Jesper.Lindberg
                      8 hours ago












                    • 1





                      Now all the services that used the account are no longer running.

                      – Jesper.Lindberg
                      8 hours ago







                    1




                    1





                    Now all the services that used the account are no longer running.

                    – Jesper.Lindberg
                    8 hours ago





                    Now all the services that used the account are no longer running.

                    – Jesper.Lindberg
                    8 hours ago

















                    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%2f520368%2fhow-do-i-disable-login-of-user%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

                    Siegen Nawigatsjuun

                    Log på Navigationsmenu

                    Log på Navigationsmenu