opsicommon.system.linux package

Module contents

This file is part of opsi - https://www.opsi.org

opsicommon.system.linux.drop_privileges(username)
Parameters:

username (str) –

Return type:

None

opsicommon.system.linux.get_kernel_params()

Reads the kernel cmdline and returns a dict containing all key=value pairs. Keys are converted to lower case.

Return type:

dict[str, str]

opsicommon.system.linux.get_system_uuid()
Return type:

str

opsicommon.system.linux.get_user_sessions(username=None, session_type=None)
Parameters:
  • username (Optional[str]) –

  • session_type (Optional[str]) –

Return type:

Generator[Session, None, None]

opsicommon.system.linux.run_process_in_session(command, session_id, shell=False, impersonate=False)
Parameters:
  • command (List[str]) –

  • session_id (str) –

  • shell (bool) –

  • impersonate (bool) –

Return type:

PopenFrozen

opsicommon.system.linux.set_system_datetime(utc_datetime)
Parameters:

utc_datetime (datetime) –

Return type:

None