Bug 22353

Summary: passwd -removing executable bit doesn't give the expected results.
Product: [Retired] Red Hat Linux Reporter: Need Real Name <orlando_toujague>
Component: binutilsAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0Keywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-12-15 16:14:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2000-12-15 16:14:34 UTC
I just took the RH133 course with Mr. Day at your HQ site this week and
found an item that  seemed a bit buggy.

The instructor informed us that if you were to take "execute" away from
/usr/bin/passwd, the SUID bit would go from a small 's' to a capital 'S'
thus indicating a problem. This did infact happen.

However, he also did say that neither the typical user nor root would be
able to execute /usr/bin/passwd. When I tried it though, even though the
user account wasn't able to execute /usr/bin/passwd I found that root still
could. Was he wrong? Or is this a bug? Thanks.

Comment 1 Jakub Jelinek 2000-12-15 16:23:12 UTC
First of all, this is in no way related to binutils.
Second, it depends how you "took away" execute bit. If any of the
owner/group/other execute bits are set, root (passwd is owned by root:root)
is allowed to execute it.