Disable ssh login for an account.: Difference between revisions

From munkjensen.net/wiki
(Created page with "=== Disable account login without disabling the account === <syntaxhighlight lang="xml" line>usermod --expiredate 1 [LOGIN]</syntaxhighlight> Will let sudoers login to the a...")
 
Line 1: Line 1:
=== Disable account login without disabling the account ===
=== Disable account login without disabling the account ===


<syntaxhighlight lang="xml" line>usermod --expiredate 1 [LOGIN]</syntaxhighlight>
<syntaxhighlight lang="xml" line>usermod --expiredate 1 [accountname]</syntaxhighlight>


Will let sudoers login to the account linke this:
Will let sudoers login to the account linke this:
<syntaxhighlight lang="xml" line>sudo su - [LOGIN]</syntaxhighlight>
<syntaxhighlight lang="xml" line>sudo su - [accountname]</syntaxhighlight>

Revision as of 13:00, 1 March 2017

Disable account login without disabling the account

usermod --expiredate 1 [accountname]

Will let sudoers login to the account linke this:

sudo su - [accountname]