GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Execution with ACL
Operating System - HP-UX
1847488
Members
3469
Online
110265
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2004 08:59 AM
07-09-2004 08:59 AM
Hi,
Does somebody know if could configure the acl so that could a common user change the password of another using the passwd command ?
Thanks
Henry
Does somebody know if could configure the acl so that could a common user change the password of another using the passwd command ?
Thanks
Henry
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2004 09:25 AM
07-09-2004 09:25 AM
Re: Execution with ACL
No way but having writing right on /etc/passwd .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2004 09:34 AM
07-09-2004 09:34 AM
Solution
Henry,
Nope. ACL cannot be used by a common user to change the password of another user.
/usr/bin/passwd binary already has SUID enabled. It is the checks inside the passwd binary that lets only root to change the password of other users.
You can write a small C program with calls to setuid() and then invoke passwd command.
Sundar
Nope. ACL cannot be used by a common user to change the password of another user.
/usr/bin/passwd binary already has SUID enabled. It is the checks inside the passwd binary that lets only root to change the password of other users.
You can write a small C program with calls to setuid() and then invoke passwd command.
Sundar
Learn What to do ,How to do and more importantly When to do ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2004 10:41 AM
07-09-2004 10:41 AM
Re: Execution with ACL
Try this
root> cat /usr/local/bin/pex.c
#include
#include
main(argc,argv)
int argc;
char *argv[];
{
setuid(0);
execl("/usr/bin/passwd","passwd",argv[1],0);
}
#
# cc /usr/local/bin/pex.c -o /usr/local/bin/passex
#
root> cat /usr/local/bin/passchg.sh
#!/usr/bin/sh
USER=$1
grep -n "$USER$" /etc/NOTALLOWED >/dev/null 2>&1
if [ $? -eq 0 ]
then
echo "You are not allowed to change the password for $USER"
exit 1
fi
/usr/local/bin/passex $USER
root>
root> chmod 4755 /usr/local/bin/passchg.sh
root> cat /etc/NOTALLOWED
root
root>
Remember this is a strict NO-NO in security world :-) but if you have to do it then there is one more way
execute sam with -r option and authorize the user(s) to run only the "Accounts for users and groups" section
root> cat /usr/local/bin/pex.c
#include
#include
main(argc,argv)
int argc;
char *argv[];
{
setuid(0);
execl("/usr/bin/passwd","passwd",argv[1],0);
}
#
# cc /usr/local/bin/pex.c -o /usr/local/bin/passex
#
root> cat /usr/local/bin/passchg.sh
#!/usr/bin/sh
USER=$1
grep -n "$USER$" /etc/NOTALLOWED >/dev/null 2>&1
if [ $? -eq 0 ]
then
echo "You are not allowed to change the password for $USER"
exit 1
fi
/usr/local/bin/passex $USER
root>
root> chmod 4755 /usr/local/bin/passchg.sh
root> cat /etc/NOTALLOWED
root
root>
Remember this is a strict NO-NO in security world :-) but if you have to do it then there is one more way
execute sam with -r option and authorize the user(s) to run only the "Accounts for users and groups" section
Learn What to do ,How to do and more importantly When to do ?
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP