Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pfexec: Exec format error

288 views
Skip to first unread message

awl9w0h...@mail.htl22.at

unread,
Jun 30, 2008, 10:09:10 AM6/30/08
to
Dear all,

I have tried to set-up a user to run a command as another user
(which is a role). The current config is:

/etc/user_attr:
jjohn::::type=normal;profiles=UncaExec
unca::::type=role;profiles=All

/etc/security/prof_attr:
UncaExec:::UncaExec

/etc/security/exec_attr
UncaExec:suser:cmd:::/tmp/fred:uid=603;gid=207

# cat /tmp/fred
/usr/bin/id

# ls -ld /tmp/fred
-r-xr-x--- 1 unca unca 12 Jun 30 08:54 /tmp/fred


$ id
uid=319(jjohn) gid=14(sysadmin)
$ /tmp/fred
pfexec: Exec format error

Does anyone know what this error message really means. I can find not
useful reference to this on the usual seach engines. I don't think
the syntax is incorrect because I simply copied the lines from a known
working configuration.


hume.sp...@bofh.ca

unread,
Jun 30, 2008, 10:17:43 AM6/30/08
to
awl9w0h...@mail.htl22.at <awl9w0h...@mail.htl22.at> wrote:
> $ /tmp/fred
> pfexec: Exec format error
>
> Does anyone know what this error message really means. I can find not

It usually means that the file is not the right format for the system
you're on. What does 'file /tmp/fred' tell you? Are you trying to run
a Linux binary on Solaris? Or a SPARC executable on x86, or vise-versa?

--
Brandon Hume - hume -> BOFH.Ca, http://WWW.BOFH.Ca/

awl9w0h...@mail.htl22.at

unread,
Jun 30, 2008, 10:29:33 AM6/30/08
to
I did not know that ascii was machine dependent.

As I wrote:
# cat /tmp/fred
/usr/bin/id


# file /tmp/fred
/tmp/fred: commands text
# file /usr/bin/id
/usr/bin/id: ELF 32-bit MSB executable SPARC Version 1, dynamically
linked, stripped
# uname -a
SunOS kubera 5.9 Generic_118558-33 sun4u sparc SUNW,Sun-Fire-15000

If /usr/bin/id is broken, which it is not, then this would not be the
only problem I would be having today.

On Jun 30, 4:17 pm, hume.spamfil...@bofh.ca wrote:

hume.sp...@bofh.ca

unread,
Jun 30, 2008, 11:32:50 AM6/30/08
to
awl9w0h...@mail.htl22.at <awl9w0h...@mail.htl22.at> wrote:
> # file /tmp/fred
> /tmp/fred: commands text

"commands text"? As opposed to "executable shell script"?

Did you forget your "#!/bin/sh" at the top?

awl9w0h...@mail.htl22.at

unread,
Jun 30, 2008, 11:49:58 AM6/30/08
to
On Jun 30, 5:32 pm, hume.spamfil...@bofh.ca wrote:

> awl9w0hv5fue...@mail.htl22.at <awl9w0hv5fue...@mail.htl22.at> wrote:
> > # file /tmp/fred
> > /tmp/fred:      commands text
>
> "commands text"?  As opposed to "executable shell script"?
>
> Did you forget your "#!/bin/sh" at the top?
>

You star. This solved it.

0 new messages