- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- user with full read priv
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-08-2003 10:32 PM
11-08-2003 10:32 PM
I just got a quick question from a friend about creating a user in a HP 11.0 box who can read all the files in the system including the files owned and read only by root.
,e.g., the history file
-r-------- 1 root root 11257 Nov 5 10:54 /.sh_history
Is it possible with sudo or sam -r. Or is there any other way to achieve it. Or is it not a workable idea.
Please advise.
Thanks
Rasheed.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2003 10:39 PM
11-08-2003 10:39 PM
Re: user with full read priv
you can use su or sudo to switch to root privelge at times you require. for su you require root password.
Another crude idea is to create a user with UID and GID as 0 ( edit /etc/passwd file as root).
And for any of the methods you require root's delegation consent/help initially, except you hack the system ;-) .
regards,
U.SivaKumar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2003 10:43 PM
11-08-2003 10:43 PM
Re: user with full read priv
Sorry, may be my question was not clear enough.
I want this user to ONLY READ every files on the system same as a super user can do but NO WRITE privilege to any of the super user files.
Rasheed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2003 10:46 PM
11-08-2003 10:46 PM
Re: user with full read priv
this can be done by sudo.
Download the software and go to /etc/sudoers file.(remember, edit with "visudo") to give the user access to root commands.
Attached an example of the sudoers file.
Remember to be super-user to give acces to this file.
If you need more help,Please ask.
Regards
DGH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2003 10:50 PM
11-08-2003 10:50 PM
Re: user with full read priv
I have not tested, but maybe using "sudo" to run "cat" command as root ...
Kind regards,
Zigor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2003 10:57 PM
11-08-2003 10:57 PM
Re: user with full read priv
Sudo is already setup on the system. But I just would like to know the correct commands (or sequence of commands) to achieve this on the sudoers file. If anyone can advise, I would appreciate it.
Thank you
Rasheed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2003 11:29 PM
11-08-2003 11:29 PM
Re: user with full read priv
DGH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2003 11:38 PM
11-08-2003 11:38 PM
Re: user with full read priv
Edit /etc/sudoers
rasheed ALL = /usr/bin/more
rasheed ALL = /usr/bin/cat
Now as login as `rasheed`
$ sudo more /.sh_history
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2003 11:41 PM
11-08-2003 11:41 PM
Re: user with full read priv
Sudo version 1.6.3p
Rgds.
Rasheed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2003 11:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2003 06:22 PM
11-09-2003 06:22 PM
Re: user with full read priv
1- go to /usr/local/sbin and type
# ./visudo
this will open the sidorers file to edit it.
and this is an example of the file:
# User privilege specification
root ALL=(ALL) ALL
user ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
user ALL=(ALL) NOPASSWD: ALL
2- change the permission to the file /usr/local/bin/sudo.
---S--x--x 1 root root 114688 Oct 15 13:58 sudo
3- edit the .profile of the user and add the PATH :/usr/local/bin
4- login with the user.
5- if you want to read the history file type:
# sudo /.sh_history
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2003 06:23 PM
11-09-2003 06:23 PM
Re: user with full read priv
# sudo more /.sh_history
DGH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2003 10:47 PM
11-09-2003 10:47 PM
Re: user with full read priv
There is another workaround without using "sudo".
copy the cat command to another name.
#cp /usr/bin/cat /usr/bin/new_cat
set the setuid bit on this executable.
#chmod u+s /usr/bin/new_cat
from user login if you try
$/usr/bin/new_cat
user can read any file.
i.e the cat process will run as root user.
Warning: Any user knowing this cammand can use this and will be security
problem.
TT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 12:16 AM
11-10-2003 12:16 AM
Re: user with full read priv
I'd go for the cat command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 12:17 AM
11-10-2003 12:17 AM
Re: user with full read priv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 10:08 PM
11-10-2003 10:08 PM
Re: user with full read priv
what I did as the sudo user
sudo more /.rootsfile
Then I got the rootsfile on my screen. But when I did :sh from the more screen I got the shell as expected. But when I typed whoami -- alas, it is root!
So this is what I really do not want to happen at all. So there might be a little more tuning required in the sudoers file. Can anyone look into it.
Thank you
Rasheed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2003 11:25 PM
11-10-2003 11:25 PM
Re: user with full read priv
Try using "pg" command, not "more". It has the "-r" option:
" ...-r Restricted mode. The shell escape is disallowed.
pg will print an error message but does not exit."
HTH
Kind regards,
Zigor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2003 12:47 AM
11-11-2003 12:47 AM
Re: user with full read priv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2003 10:57 PM
11-11-2003 10:57 PM
Re: user with full read priv
Thanks
Rasheed.