User Tools

Site Tools


aix:hmc_cmd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
aix:hmc_cmd [2024/02/09 22:08]
manu
aix:hmc_cmd [2025/10/22 17:06] (current)
manu [User management]
Line 406: Line 406:
 </​code>​ </​code>​
  
 +=== Change user timeout ===
 +
 +Change user default login paramters
 +<cli prompt='>'>​
 +hscroot@hmcp9:​~>​ lshmcusr -t default
 +session_timeout=0,​idle_timeout=120,​max_login_attempts=3,​login_suspend_time=5,​max_webui_sessions_per_user=100,​max_webui_sessions=1000
 +
 +hscroot@hmcp9:​~>​ chhmcusr -t default -i "​session_timeout=1440,​idle_timeout=60"​
 +
 +hscroot@hmcp9:​~>​ lshmcusr -t default
 +session_timeout=1440,​idle_timeout=60,​max_login_attempts=3,​login_suspend_time=5,​max_webui_sessions_per_user=100,​max_webui_sessions=1000
 +</​cli>​
 +
 +Change parameters for a specific user
 +<cli prompt='>'>​
 +hscroot@hmcp9:​~>​ lshmcusr | grep hscroot
 +name=hscroot,​taskrole=hmcsuperadmin,​description=HMC Super User,​pwage=99999,​resourcerole=ALL:,​authentication_type=local,​remote_webui_access=1,​remote_ssh_access=1,​min_pwage=0,​session_timeout=1440,​verify_timeout=15,​idle_timeout=60,​inactivity_expiration=0,​resources=<​ResourceID = ALL:><​UserDefinedName = AllSystemResources>,​password_encryption=sha512,​disabled=0,​passwd_authentication=1
 +
 +hscroot@hmcp9:​~>​ chhmcusr -i "​name=hscroot,​session_timeout=1440,​idle_timeout=60"​
 +
 +hscroot@hmcp9:​~>​ lshmcusr | grep hscroot
 +name=hscroot,​taskrole=hmcsuperadmin,​description=HMC Super User,​pwage=99999,​resourcerole=ALL:,​authentication_type=local,​remote_webui_access=1,​remote_ssh_access=1,​min_pwage=0,​session_timeout=1440,​verify_timeout=15,​idle_timeout=60,​inactivity_expiration=0,​resources=<​ResourceID = ALL:><​UserDefinedName = AllSystemResources>,​password_encryption=sha512,​disabled=0,​passwd_authentication=1
 +</​cli>​
 +
 +=== List active users / login ===
 +
 +List SSH tasks or user for logged in:
 +<cli prompt='>'>​
 +hscroot@hmcp9:​~>​ lslogon -r ssh -t
 +task_name=bash,​tty_id=pts/​1,​start_time=Oct 22 15:02:40 2025,​user_name=root,​pid=359428
 +hscroot@hmcp9:​~>​ lslogon -r ssh -u
 +user_name=hscroot,​tty_id=pts/​1,​logon_time=2025-10-22 15:​02,​access_location=10.10.10.10
 +</​cli>​
 +
 +List WebUI user logged in:
 +<cli prompt='>'>​
 +hscroot@hmcp9:​~>​ lslogon -r webui -u
 +user_name=hscroot,​session_id=2,​logon_time=06/​10/​2025 10:​58:​36,​logon_mode=Enhanced+
 +user_name=hscroot,​session_id=678,​logon_time=06/​17/​2025 11:​23:​03,​logon_mode=Enhanced+
 +user_name=hscroot,​session_id=1444,​logon_time=06/​25/​2025 10:​38:​39,​logon_mode=Enhanced+
 +user_name=lpar2rrd,​session_id=1454,​logon_time=06/​25/​2025 13:​00:​03,​logon_mode=Rest API
 +user_name=lpar2rrd,​session_id=1455,​logon_time=06/​25/​2025 13:​00:​03,​logon_mode=Rest API
 +</​cli>​
 +
 +Kill a user session with all his tasks
 +<cli prompt='>'>​
 +hscroot@hmcp9:​~>​ termtask -r webui -s 2 -t all
 +</​cli>​
 ==== Manage HMC disk space ==== ==== Manage HMC disk space ====
  
Line 875: Line 923:
 hscroot@hmc01:​~>​ chhmc -c kerberos -s add --realm <​kerberos_hostname>​ -a <​kerberos_ip>​ hscroot@hmc01:​~>​ chhmc -c kerberos -s add --realm <​kerberos_hostname>​ -a <​kerberos_ip>​
 </​cli>​ </​cli>​
 +
 +==== Led management ====
 +
 +Turn off / on a LED on a server
 +<cli prompt='>'>​
 +hscroot@hmc01:​~>​ lssyscfg -r sys -F name
 +Power10_01_siteA
 +</​cli>​
 +
 +Check to see if the attention LED is active
 +<cli prompt='>'>​
 +hscroot@hmc01:​~>​ lsled -r sa -t phys -m Power10_01_siteA
 +state=on
 +</​cli>​
 +
 +Use the chled command to turn off the system attention LED
 +<cli prompt='>'>​
 +hscroot@hmc01:​~>​ chled -r sa -t phys -m Power10_01_siteA -o off
 +</​cli>​
 +
 +To check the status of system attention LED you can use the lsled
 +<cli prompt='>'>​
 +hscroot@hmc01:​~>​ lsled -r sa -t phys -m Power10_01_siteA ​
 +state=off
 +</​cli>​
 +
 +On partitions:
 +<cli prompt='>'>​
 +hscroot@hmc01:​~>​ lsled -r sa -t virtuallpar -m Power10_01_siteA ​
 +lpar_id=22,​lpar_name=AIXA001,​state=off
 +lpar_id=17,​lpar_name=AIXA002,​state=off
 +lpar_id=13,​lpar_name=AIXA003,​state=off
 +</​cli>​
 +
aix/hmc_cmd.1707512937.txt.gz · Last modified: 2024/02/09 22:08 by manu