tickinbuaa
New Member
I want my SSH session process to have the cap_sys_admin capability when SSHing into a remote Ubuntu 22.04 server. However, I encountered issues. I configured the following:
The cap_sys_admin capability has been added to the Inheritable set but not to the Effective set. How can I fix this?
------Update----
My primary goal is to add the cap_sys_admin capability to users in a specific group, so that when members of this group SSH into the machine, they will have the cap_sys_admin capability and can use tools like perf. I am aware that configuring the perf_event_paranoid value can allow non-privileged users to use perf, but this is a global modification and should be avoided.
- Added cap_sys_admin @mygroup to /etc/security/capability.conf.
- Enabled UsePAM yes in /etc/ssh/sshd_config.
Current: cap_sys_admin=i
Bounding set=cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read,cap_perfmon,cap_bpf,cap_checkpoint_restore
Ambient set =
Current IAB: cap_sys_admin
Securebits: 00/0x0/1'b0
secure-noroot: no (unlocked)
secure-no-suid-fixup: no (unlocked)
secure-keep-caps: no (unlocked)
secure-no-ambient-raise: no (unlocked)
uid=1001(hulei) euid=1001(hulei)
gid=1001(hulei)
groups=27(sudo),998(docker),1001(hulei),1005(dev)
Guessed mode: UNCERTAIN (0)
The cap_sys_admin capability has been added to the Inheritable set but not to the Effective set. How can I fix this?
------Update----
My primary goal is to add the cap_sys_admin capability to users in a specific group, so that when members of this group SSH into the machine, they will have the cap_sys_admin capability and can use tools like perf. I am aware that configuring the perf_event_paranoid value can allow non-privileged users to use perf, but this is a global modification and should be avoided.
Last edited: