HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Forbit to change root's PW with sudo
Operating System - HP-UX
1831635
Members
1676
Online
110027
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
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
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
08-26-2003 10:28 PM
08-26-2003 10:28 PM
Forbit to change root's PW with sudo
Hi,
we have started to introduce sudo on our servers.
We are using the strategy to give every group of sudo users "ALL" permissions and dissallow some commands.
Here is an extract of the sudoers-file to make this way clear:
User_Alias TEAM1=%team1
.
.
.
Cmnd_Alias SHUTDOWN=/usr/sbin/shutdown,/sbin/shutdown
.
.
.
TEAM1 ALL=ALL,!SHUTDOWN
Now I would allow/disallow some sudo-groups:
to change the passwort of all users but not the passwort of the root user by using the "passwd" command.
Do you have suggestions how to do this?
Thanks in advance,
Stefan.
we have started to introduce sudo on our servers.
We are using the strategy to give every group of sudo users "ALL" permissions and dissallow some commands.
Here is an extract of the sudoers-file to make this way clear:
User_Alias TEAM1=%team1
.
.
.
Cmnd_Alias SHUTDOWN=/usr/sbin/shutdown,/sbin/shutdown
.
.
.
TEAM1 ALL=ALL,!SHUTDOWN
Now I would allow/disallow some sudo-groups:
to change the passwort of all users but not the passwort of the root user by using the "passwd" command.
Do you have suggestions how to do this?
Thanks in advance,
Stefan.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2003 11:56 PM
08-26-2003 11:56 PM
Re: Forbit to change root's PW with sudo
You'd need to write a wrapper script to call the passwd command in order to validate the ID before trying to apply the change
eg:
#!/usr/bin/sh
ID=$1
if [ "$ID" = "root" ]
then
echo "You are not authorised to change the password for this ID".
exit 1
fi
passwd $ID
eg:
#!/usr/bin/sh
ID=$1
if [ "$ID" = "root" ]
then
echo "You are not authorised to change the password for this ID".
exit 1
fi
passwd $ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 12:15 AM
08-27-2003 12:15 AM
Re: Forbit to change root's PW with sudo
I think the best method (sticking with sudo) is differntiate the groups of people. Have a look at the examples here and see what you think. You can restrict doing this directly from the sudoers file.
http://www.courtesan.com/sudo/man/sudoers.html#examples
http://www.courtesan.com/sudo/man/sudoers.html#examples
Anyone for a Mutiny ?
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 2025 Hewlett Packard Enterprise Development LP