- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: User privileges
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
10-21-2008 04:26 PM
10-21-2008 04:26 PM
User privileges
How can I allow normal user to execute System Admin commands like 'swlist' or 'diskinfo'?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2008 07:08 PM
10-21-2008 07:08 PM
Re: User privileges
or you can use SUDO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2008 08:28 PM
10-21-2008 08:28 PM
Re: User privileges
To configure sudo you need to take this steps.
/usr/sbin/visudo it will open the file /etc/sudoers
put these entry into it
%groupname servername=/usr/sbin/diskinfo,/usr/sbin/swlist
or
username servername=/usr/sbin/diskinfo,/usr/sbin/swlist
Save the file
switch to user username
run
sudo /usr/sbin/diskinfo
it will ask passwd of the user
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2008 12:06 AM
10-22-2008 12:06 AM
Re: User privileges
Normally swlist doesn't need root. You can use swacl to restrict it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2008 12:31 AM
10-22-2008 12:31 AM
Re: User privileges
#include
#include
int main (argc, argv)
int argc;
char **argv;
{
if (setuid (0) == 0)
{
return (system ("yourprogram"));
}
else
{
perror ("setuid");
return (1);
}
}
Make changes yourprogram to say diskinfo or swlist or some other. After the compile
# cc program.c
Change the permissions:
# chmod 4755 a.out
This program is a security risk as anything else that will compromise the execution of privileged programs.
But then so is sudo :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2008 04:43 AM
10-22-2008 04:43 AM
Re: User privileges
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1272931
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1275696
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1272698
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2008 04:50 AM
10-22-2008 04:50 AM
Re: User privileges
SUDO is your best (and safest) bet here. I use sudo for pretty much all of my users who need to do SPECIFIC tasks. If you need something more general SUDO may not be the way to go, but for specific commands and access, it is hard to beat SUDO.