- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Restricting root
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
11-15-2001 06:02 PM
11-15-2001 06:02 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2001 06:12 PM
11-15-2001 06:12 PM
Re: Restricting root
I guess if you give a user rstricted access to change the password he should be able to change the password for root also.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2001 06:28 PM
11-15-2001 06:28 PM
Re: Restricting root
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2001 06:37 PM
11-15-2001 06:37 PM
Re: Restricting root
Please be aware that providing a facility like this could potentially lead to chaos.
Never underestimate the creativity of your users.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2001 06:48 PM
11-15-2001 06:48 PM
Solution/usr/sbin/sam -r
you can set up a restricted version of sam for a user or a group.
Using a restricted version of sam does not allow you to change the root password, but does allow you to change other passwords (oracle for example).
What I have seen done is a script that uses the passwd command and sudo. This is messy, but it does work. If you use the script option you can have a list of users who are untouchable:
DATE=$(date '+%a %b %d %Y')
FULLDTE=`date`
HOSTNAME=`hostname`
PATH=/bin:/usr/sbin:/opt/sudo/bin:/usr/bin
BOLD=$(tput smso)
NORM=$(tput rmso)
UNTOUCHABLE=/opt/helpdesk/donottouchlist
LOG=/var/adm/helpdesk.log
USERFILE=/etc/passwd
change_pass()
{
read user?"Please enter a username: "
if grep -q $user $UNTOUCHABLE ; then
echo "This user: ${BOLD}$user${NORM} cannot have their password changed."
echo "$FULLDTE \t $LOGNAME \t Illegal ACTION!!!! password change for $user" >> $LOG
echo ; echo
read waiting?"PRESS RETURN TO CONTINUE"
else
sudo -u root /bin/passwd $user
sudo -u root /bin/passwd -f $user
echo "$FULLDTE \t $LOGNAME \t changed password for $user" >> $LOG
fi
}
This does work quite well, but it's a bit messy and requires sudo to be installed.
Scott.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2001 06:48 PM
11-15-2001 06:48 PM
Re: Restricting root
That is a very dangerous operation. You can try to achieve what you want by using 'sudo'. Sudo is an intelligent suid wrapper. You could wrap 'passwd' and forbid 'passwd root'. However, it's like someone else said: Never underestimate the creativity of your users...
Regards,
Paga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2001 06:59 PM
11-15-2001 06:59 PM
Re: Restricting root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2001 07:13 PM
11-15-2001 07:13 PM
Re: Restricting root
I checked here my /etc/sudoers manpage. You can definitely do what you want. You may allow certain users to user certain commands based on regular expressions. This way, you may allow your users to do 'passwd user' as long as 'user' is not root. You can also block in such a way that no other 'passwd' options will be allowed. Coul d be the solution to your problem.
Regards,
Paga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2001 07:13 PM
11-15-2001 07:13 PM
Re: Restricting root
I also believe restricted SAM isn't restrictive enough for this instance. I'd go with sudo though you might try a well written, tightly locked down suid script or program. Just be careful because passwd with root priviledges is a powerful tool.
Darrell