Operating System - HP-UX
1834047 Members
2688 Online
110063 Solutions
New Discussion

lp returning "Unable to set the effective user id to 9"

 
Gnaneshwar_1
Occasional Contributor

lp returning "Unable to set the effective user id to 9"

We had some messing up of permissions on HP d230 server.

Now when lp as root the system prints,
but any other user returns
Unable to set the effective user id to 9.

Even as root we are unable to transfer print jobs to other printers.

The CDE does not come up and returns invalid user.

Any clues
Hi
6 REPLIES 6
Michael Tully
Honored Contributor

Re: lp returning "Unable to set the effective user id to 9"

In your password file the uid 9 is for 'lp'

Check the permissions of the 'lp*' programs in /usr/sbin

They should be like this.

-r-sr-xr-x 1 root bin 40960 Nov 9 20:08 lp
-r-sr-xr-x 1 root bin 36864 Nov 9 20:08 lpalt
-r-sr-xr-x 1 lp bin 45056 Nov 9 20:08 lpstat

The permission are '4555'
Anyone for a Mutiny ?
Rajeev  Shukla
Honored Contributor

Re: lp returning "Unable to set the effective user id to 9"

Thats because the uid of lp is 9 and you might have removed the set-uid bit from the files in /usr/bin
that is the files /usr/bin/lp, /usr/bin/lpstat, /usr/bin/lpalt should have permissions as
-r-sr-xr-x 1 root bin

that might be the reason

Rajeev
T G Manikandan
Honored Contributor

Re: lp returning "Unable to set the effective user id to 9"

check the permissions of lp

-r-sr-xr-x root bin lp
W.C. Epperson
Trusted Contributor

Re: lp returning "Unable to set the effective user id to 9"

I believe you're probably missing the "lp" user in your /etc/passwd file. If that's the case, when you check perms, you'll see a uid instead of a username. "lp" should be uid 9, gid 7 (lp group). This is likely the problem with CDE as well--I don't run it, so don't know what uid it wants.
"I have great faith in fools; self-confidence, my friends call it." --Poe
Armin Feller
Honored Contributor

Re: lp returning "Unable to set the effective user id to 9"

This error is caused by incorrect permissions of the lp command, ie: not setting user to root. If you check the /usr/bin/lp command with an ls -l, you will see this:

-r-xr-xr-x root bin lp

It should be:

-r-sr-xr-x root bin lp

To change them to the correct permissions, do the following:

# chmod 4555 /usr/bin/lp

This will correct the listed error condition when printing.

Regrads,
Armin
kish_1
Valued Contributor

Re: lp returning "Unable to set the effective user id to 9"

also check the permission of /var/spool/lp
drwxr-xr-x 4 lp bin 1024 Jan 5 08:59 lp

share the power of the knowledge