Difference between revisions of "CLI - User and Session"

Line 5: Line 5:
 
==== Verifying User and Login Sessions ====
 
==== Verifying User and Login Sessions ====
 
You can verify all user list by the <code>show user</code> command. The "logged-in" indicates that someone is logged in or not.
 
You can verify all user list by the <code>show user</code> command. The "logged-in" indicates that someone is logged in or not.
 +
The "Password Aging" is used to forcibly change the password of users periodically.
 +
You can see the below message after login when you log in with an account whose password has been last changed the specified day(i.e. "Password aging") ago.
 +
In other words, we inform you to change the password of accounts every "Password aging" day.
 +
 +
''We recommend that you should change your password because your password was changed 0 days ago.
 +
Would you like to change it?(y/n):''
 +
 
<pre>
 
<pre>
 
LYSH@MyHostName# show user
 
LYSH@MyHostName# show user
user        locked  logged-in    latest
+
user        locked  logged-in    latest                           Last password change    Password Aging
ladmin      True    True        Wed Apr 28 17:55:44 +0900 2021
+
ladmin      True    True        Wed Apr 28 17:55:44 +0900 2021   Apr 23, 2021            30 days
 
</pre>
 
</pre>
  
Line 15: Line 22:
 
LYSH@MyHostName# show session
 
LYSH@MyHostName# show session
 
  18:58:08 up 86 days, 10:51,  4 users,  load average: 0.09, 0.14, 0.15
 
  18:58:08 up 86 days, 10:51,  4 users,  load average: 0.09, 0.14, 0.15
USER            TTY      FROM            LOGIN@  IDLE  JCPU  PCPU WHAT
+
USER            TTY      FROM            LOGIN@  IDLE  JCPU  PCPU
ladmin          pts/1    192.168.0.11    Mon10    0.00s  2.56s  0.25s /usr/bin/python3 /usr/sbin/lysh
+
ladmin          pts/1    192.168.0.11    Mon10    0.00s  2.56s  0.25s
ladmin          pts/2    192.168.0.11    Mon10    1:02m  0.53s  0.41s sshd: ladmin [priv]
+
ladmin          pts/2    192.168.0.11    Mon10    1:02m  0.53s  0.41s
 
</pre>
 
</pre>
  
Line 33: Line 40:
 
LYSH@MyHostName# disconnet pts/2
 
LYSH@MyHostName# disconnet pts/2
 
  18:58:08 up 86 days, 10:51,  4 users,  load average: 0.09, 0.14, 0.15
 
  18:58:08 up 86 days, 10:51,  4 users,  load average: 0.09, 0.14, 0.15
USER            TTY      FROM            LOGIN@  IDLE  JCPU  PCPU WHAT
+
USER            TTY      FROM            LOGIN@  IDLE  JCPU  PCPU
ladmin          pts/1    192.168.0.11    Mon10    0.00s  2.56s  0.25s /usr/bin/python3 /usr/sbin/lysh
+
ladmin          pts/1    192.168.0.11    Mon10    0.00s  2.56s  0.25s
ladmin          pts/2    192.168.0.11    Mon10    1:02m  0.53s  0.41s sshd: ladmin [priv]
+
ladmin          pts/2    192.168.0.11    Mon10    1:02m  0.53s  0.41s
 
</pre>
 
</pre>
  
Line 45: Line 52:
 
confiugre# exit
 
confiugre# exit
 
LYSH@MyHostName# show user
 
LYSH@MyHostName# show user
user        locked  logged-in    latest
+
user        locked  logged-in    latest                           Last password change    Password Aging
ladmin      True    True        Wed Apr 28 17:55:44 +0900 2021
+
ladmin      True    True        Wed Apr 28 17:55:44 +0900 2021   Apr 23, 2021            30 days
newuser      False    False        **Never logged in**
+
newuser      True    False        **Never logged in**               Apr 29, 2021            30 days
 
</pre>
 
</pre>
  
Line 66: Line 73:
 
  configure# exit
 
  configure# exit
 
  LYSH@MyHostName# show user
 
  LYSH@MyHostName# show user
  user        locked  logged-in    latest
+
  user        locked  logged-in    latest                           Last password change    Password Aging
  baseindev    False    True        Fri Apr 30 09:32:05 +0900 2021
+
  ladmin      True    True        Wed Apr 28 17:55:44 +0900 2021   Apr 23, 2021            30 days
  newuser      '''True'''     False        Thu Apr 29 18:52:16 +0900 2021
+
  newuser      True    False        **Never logged in**              Apr 29, 2021           30 days 
 
   
 
   
 
  LYSH@MyHostName# configure
 
  LYSH@MyHostName# configure
Line 74: Line 81:
 
  configure# exit
 
  configure# exit
 
  LYSH@MyHostName# show user
 
  LYSH@MyHostName# show user
  user        locked  logged-in    latest
+
  user        locked  logged-in    latest                           Last password change    Password Aging
  baseindev    False    True        Fri Apr 30 09:32:05 +0900 2021
+
  ladmin      True    True        Wed Apr 28 17:55:44 +0900 2021   Apr 23, 2021            30 days
  newuser      '''False'''    False        Thu Apr 29 18:52:16 +0900 2021
+
  newuser      False   False        **Never logged in**              Apr 29, 2021           30 day1
 
</pre>
 
</pre>

Revision as of 11:08, 30 April 2021

User

The user in the CLI means a user account that can directly connect to the imRAD devices using a console or ssh.

Verifying User and Login Sessions

You can verify all user list by the show user command. The "logged-in" indicates that someone is logged in or not. The "Password Aging" is used to forcibly change the password of users periodically. You can see the below message after login when you log in with an account whose password has been last changed the specified day(i.e. "Password aging") ago. In other words, we inform you to change the password of accounts every "Password aging" day.

We recommend that you should change your password because your password was changed 0 days ago. Would you like to change it?(y/n):

LYSH@MyHostName# show user
user         locked   logged-in    latest                            Last password change    Password Aging
ladmin       True     True         Wed Apr 28 17:55:44 +0900 2021    Apr 23, 2021            30 days

If you enter the show session command, you can see all login sessions.

LYSH@MyHostName# show session
 18:58:08 up 86 days, 10:51,  4 users,  load average: 0.09, 0.14, 0.15
USER             TTY      FROM             LOGIN@   IDLE   JCPU   PCPU
ladmin           pts/1    192.168.0.11     Mon10    0.00s  2.56s  0.25s
ladmin           pts/2    192.168.0.11     Mon10    1:02m  0.53s  0.41s

Configuring Password

You can change the password of the user by entering the user password command in the configuration mode. If you execute the user password command, the system will ask for the current password and new password.

LYSH@MyHostName# configure
configure# user password

Disconnecting User

You can forcibly disconnect a user session by the disconnect {tty} command in the user mode. you should ensure the tty[1] of a user session by he show session command before disconnecting a session.

LYSH@MyHostName# disconnet pts/2
 18:58:08 up 86 days, 10:51,  4 users,  load average: 0.09, 0.14, 0.15
USER             TTY      FROM             LOGIN@   IDLE   JCPU   PCPU
ladmin           pts/1    192.168.0.11     Mon10    0.00s  2.56s  0.25s
ladmin           pts/2    192.168.0.11     Mon10    1:02m  0.53s  0.41s

Adding User

In the configuration mode, you can create a new user. Also, you can delete, lock, or unlock an existing user.

LYSH@MyHostName# configure
confiugre# user add newuser newpassword
confiugre# exit
LYSH@MyHostName# show user
user         locked   logged-in    latest                            Last password change    Password Aging
ladmin       True     True         Wed Apr 28 17:55:44 +0900 2021    Apr 23, 2021            30 days
newuser      True     False        **Never logged in**               Apr 29, 2021            30 days

Deleting User

To delete a specific user, enter the user delete {username} command in the configuration mode.
Note that if you delete a user who is in a login state, you will fail to delete it. Therefore you must disconnect the user before deleting it.

LYSH@MyHostName# configure
confiugre# user delete newuser

lock/unlock

You can lock a user. And then you can't log in with the locked user. Also, you can unlock the locked user.

LYSH@MyHostName# configure
confiugre# user lock newuser
configure# exit
LYSH@MyHostName# show user
user         locked   logged-in    latest                            Last password change    Password Aging
ladmin       True     True         Wed Apr 28 17:55:44 +0900 2021    Apr 23, 2021            30 days
newuser      True     False        **Never logged in**               Apr 29, 2021            30 days   

LYSH@MyHostName# configure
confiugre# user unlock newuser
configure# exit
LYSH@MyHostName# show user
user         locked   logged-in    latest                            Last password change    Password Aging
ladmin       True     True         Wed Apr 28 17:55:44 +0900 2021    Apr 23, 2021            30 days
newuser      False    False        **Never logged in**               Apr 29, 2021            30 day1