[linux master][리눅스 마스터][국가기술자격]  How to fix sudo after "chmod -R 777 /usr/bin"?   

/usr/bin/sudo must be owned by uid 0 and have the setuid bit set

I entered chmod -R 777 /usr/bin and now sudo is not working.

It says sudo must be setuid root.

Some advice online said to run chown root:root /usr/bin/sudo chmod 4755 /usr/bin/sudo.

On entering chown root:root /usr/bin/sudo it shows an opened in readonly mode error.

 

----------------------

 

 

I couldn't be a root user by using the "su" command because I didn't have a root password, but instead I used this command to become a root user: systemd-run --shell and after that: chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo My problem is solved.

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

 

 

On an Ubuntu desktop system, PolicyKit is installed, so pkexec can be used to repair a broken sudo executable or sudoers file. You do not need to boot into recovery mode and you do not need to boot from a live CD. You don't even need to reboot.

In this case, run the following commands:

pkexec chown root:root /usr/bin/sudo
pkexec chmod 4755 /usr/bin/sudo

 

[출처1] https://askubuntu.com/questions/127446/how-to-fix-sudo-after-chmod-r-777-usr-bin

[출처2] https://repost.aws/ko/questions/QUCmOj_ncRRkayvV29-KmaTg/i-get-this-error-trying-to-run-sudo-command-sudo-usr-bin-sudo-must-be-owned-by-uid-0-and-have-the-setuid-bit-set?sc_ichannel=ha&sc_ilang=en&sc_isite=repost&sc_iplace=hp&sc_icontent=QUCmOj_ncRRkayvV29-KmaTg&sc_ipos=15

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수

등록된 글이 없습니다.

대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED