This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
aix:hmc_cmd [2024/03/29 11:49] 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 ==== | ||