Sample Header Ad - 728x90

Why does adding a user and setting an SUID for it throws me the "Operation not permitted" error?

1 vote
1 answer
546 views
I am setting SUID for a new user tommy to run the same commands as root but it goes down like this:
[root@192 ~]# useradd tommy
[root@192 ~]# su - tommy
[tommy@192 ~]$ chmod u+s /usr/bin/ls
chmod: changing permissions of '/usr/bin/ls': Operation not permitted`
Do I need to add this user to sudoers file in order to execute this command successfully or what?
Asked by Navdeep Singh (37 rep)
Mar 20, 2023, 02:50 AM
Last activity: Mar 20, 2023, 03:37 AM