- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Reading root mail using sudo
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
05-18-2004 03:33 AM
05-18-2004 03:33 AM
Reading root mail using sudo
OPERUSER ALL=(ALL) NOPASSWD: ALL
Most functions are available to the operators but they cannot check to see if root has any mail. It appears when "mail" is entered, it shows the information for the original user. Logging on as root does show there is mail.
Any suggestions on how to correct this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 03:39 AM
05-18-2004 03:39 AM
Re: Reading root mail using sudo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 05:48 AM
05-18-2004 05:48 AM
Re: Reading root mail using sudo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 06:05 AM
05-18-2004 06:05 AM
Re: Reading root mail using sudo
They should be able to "sudo su - root"
then type "mail"
or "sudo su - root -c mail"
Either of those should work. And they should not need the passwd, if sudo prompts for a passwd they can use the operuser passwd they have, they do not need roots passwd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 06:15 AM
05-18-2004 06:15 AM
Re: Reading root mail using sudo
If u run the command su root the environment is not changed, while if u run the command su - root the environment is exactly the same as logging in as root.
Try to run the sudo command with a script like
#!/usr/bin/sh
export LOGNAME=root
export MAIL=/var/mail/root
it should use the root mailbox
Bye Cesare
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 08:04 AM
05-18-2004 08:04 AM
Re: Reading root mail using sudo
If you want them to only have privilages to run certain commands, it's better to specify each command they have access to in your sudoers file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 08:23 AM
05-18-2004 08:23 AM
Re: Reading root mail using sudo
Once your operator has done sudo to root, let them do a su - root and when they get the root prompt, they should be able to read the root mail.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 08:46 AM
05-18-2004 08:46 AM
Re: Reading root mail using sudo
sudo, if not configured right, is just as bad as giving them the root password. You give me sudo access to your system, and unless you know all the holes, I bet I could get a root shell pretty easy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2004 12:31 AM
05-19-2004 12:31 AM
Re: Reading root mail using sudo
Add a Cmnd_Alias like:
Cmnd_Alias ROOTMAIL=/bin/mail -f /var/mail/root
(Sorry, tab / space formating is lost)
Then add ROOTMAIL to your user privilege section. Keep in mind /bin/mail has a shell escape, so it is not secure.
However if your OPERUSER entry is for real, you are not secure anyway. I really do not like that entry.
I don't believe in granting more privilege than necessary. Thats the one drawback to sudo: If you want it secure, it is a hassle to admin!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2004 12:48 AM
05-19-2004 12:48 AM
Re: Reading root mail using sudo
User must enter the command exactly like the Cmnd_Alias, IE:
'sudo /bin/mail -f /var/mail/root'
Rt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 12:28 AM
06-03-2004 12:28 AM