- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: What is required to get lpadmin to run as a us...
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
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
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
07-04-2011 06:09 PM
07-04-2011 06:09 PM
What is required to get lpadmin to run as a user other than root?
HP-UX 11.31
I am trying to get lpadmin to run under a service account, so that I can add, and remove printers on a single system from a custom web interface.
How can I get lpadmin to run as "user1" ?
I have tried changing the permissions on lpadmin.
I have added user1 to the following groups: root, sys, bin, lp, adm - all to no avail
I have tried compiling a wrapper to set the euid, egid, uid, and gid, all to 0, but I still get an error message stating:
"lpadmin: this command for use only by LP Administrators"
How do I give permit lpadmin to be executed by user1?
Midrange Systems Analyst III
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2011 09:33 PM
07-04-2011 09:33 PM
Re: What is required to get lpadmin to run as a user other than root?
Hi,
as you already found only root can run it - to enable normal user you can install sudo: http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.8.0/
hth,
Stephan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2011 08:22 AM
07-05-2011 08:22 AM
Re: What is required to get lpadmin to run as a user other than root?
OK fair enough, but my wrapper has set the uid, euid, gid, egid bits all to 0. When I execute a shell using my wrapper, and execute a "who" it tells me that I am root.
What is lpadmin checking when it determines that I am not root?
I tried granting access to printers through "sam -r" and that did not work either
Midrange Systems Analyst III
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2011 08:27 AM
07-05-2011 08:27 AM
Re: What is required to get lpadmin to run as a user other than root?
>What is lpadmin checking when it determines that I am not root?
What are the permissions and owners of lpadmin? Did you fiddle with them?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2011 08:36 AM - edited 07-05-2011 08:43 AM
07-05-2011 08:36 AM - edited 07-05-2011 08:43 AM
Re: What is required to get lpadmin to run as a user other than root?
No, I did not fiddle with the binary:
(/usr/sbin)# ls -la lpadmin
-r-sr-xr-x 1 root bin 158920 Jan 15 2009 lpadmin
Midrange Systems Analyst III
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2011 08:06 PM
07-07-2011 08:06 PM
Re: What is required to get lpadmin to run as a user other than root?
Sounds like you're not setting the real uid as root and I believe lpadmin is looking at the reail uid.
Are you using setresuid(2)?
Here's my simple wrapper which I used to test successfully:
#include <stdio.h>
main()
{
setresuid(0,0,0)
system("/usr/sbin/lpadmin -s")
}
Hope this helps,
-denver
- Tags:
- setresuid