Operating System - HP-UX
1748092 Members
5831 Online
108758 Solutions
New Discussion юеВ

Re: sd commands (except swlist) failing on permissions

 
Don Ferderber
Advisor

sd commands (except swlist) failing on permissions

Hi All ! ...

Having trouble executing SD commands on one of my HP-UX systems running HP-UX 11.11. Getting the following error (using swverify in this example):

# /usr/sbin/swverify PHSS_34428

======= 07/31/09 13:32:42 EDT BEGIN swverify SESSION
(non-interactive) (jobid=zrtph0v0-3219)

* Session started for user "root@zrtph0v0".

* Beginning Selection
ERROR: "zrtph0v0:/": You do not have the required permissions to
select this target. Check permissions using the "swacl"
command or see your system administrator for assistance. Or,
to manage applications designed and packaged for nonprivileged
mode, see the "run_as_superuser" option in the "sd" man page.
* Target connection failed for "zrtph0v0:/".
ERROR: More information may be found in the daemon logfile on this
target (default location is
zrtph0v0:/var/adm/sw/swagentd.log).
* Selection had errors.



======= 07/31/09 13:32:42 EDT END swverify SESSION (non-interactive)
(jobid=zrtph0v0-3219)

I do know, from looking through log files, that at one point during an install something went wrong. From that point on, SD commands (other than swlist) seem to fail. Is there a lock file or something that is preventing me from executing SD commands ?

Any help would be greatly appreciated.
39 REPLIES 39
SoorajCleris
Honored Contributor

Re: sd commands (except swlist) failing on permissions

Hi,
Did you try to restard swagent?

you may try

/usr/sbin/swagentd -r

Regards,
Sooraj U
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Don Ferderber
Advisor

Re: sd commands (except swlist) failing on permissions

Yes ...

Swagentd has been restarted multiple times.

Don Ferderber
Advisor

Re: sd commands (except swlist) failing on permissions

Hi Again ...

Thanks for your replies. I went through all of the links you supplied and none of them apply. I need to repeat that I am unable to execute ANY SD commands except swlist. Even something like swverify to verify the installation of a patch fails with the previously mentioned message. I cannot execute swinstall, swacl, swverify, swcopy, etc.

This restricts my ability to install patches, or anything else for that matter. I am fairly well versed in SD commands, but am pulling my hair out on this one. Is it possible that there is a lock file, or that an INDEX file is corrupt ?

(Thanks and) Regards,
Don
Mel Burslan
Honored Contributor

Re: sd commands (except swlist) failing on permissions

Since you have said you are well versed in SD family of commands, I am sure you have already removed /var/adm/sw/products/swlock file before restarting swagentd. Sometimes it causes nasties but lately, I did nothave to do it for quite a while. So, you might try if you have not already.
________________________________
UNIX because I majored in cryptology...
Dennis Handly
Acclaimed Contributor

Re: sd commands (except swlist) failing on permissions

>I am unable to execute ANY SD commands except swlist.

If it's not swagentd or networking and swlist works, can you provide this output:
swacl -l root

Are all of the sw* executables hardlinks to the same file?
ll -i /usr/sbin/sw*
Don Ferderber
Advisor

Re: sd commands (except swlist) failing on permissions

Hi Everyone ...

I appreciate the interest in this one ... it still has me perplexed. Thank you for the suggestion of swlock, but that file does not exist. As for the output from swacl, unfortunately it reacts the same way as the other sd commands. I have included the output:

# cd /var/adm/sw/products
# ls sw*
sw* not found


# swacl -l root
#
# swacl Installed Software Access Control List
#
# For host: zrtph0v0:/
#
# Date: Sat Aug 1 00:55:51 2009
#

ERROR: You are not authorized to perform the requested operation on
the "root" ACL at "zrtph0v0:/". Depending on whether you are
attempting to list or modify the ACL, you do not have the
required "test" or "control" permission, respectively. (Use
the "id" command to find out the identity information used by
SD to determine your access permissions.)
#


As I mentioned earlier, this all seems to have stemmed from an install that went bad. I believe the system "may" have unexpectedly rebooted during an install (I cannot be sure) and this has corrupted something.

This is where my knowledge of how sd works is limited. Something is now preventing the commands to recognize that they are being executed as root.
Don Ferderber
Advisor

Re: sd commands (except swlist) failing on permissions

As for the sd commands being link to the same executable, it looks like they are (bummer! ... thought we may have been onto something!) ... here is the output:

# ll -i /usr/sbin/sw*
78033 -r-sr-xr-x 11 root bin 2478080 Feb 16 2007 /usr/sbin/swacl
166592 -r-xr-xr-x 1 bin bin 798720 Jun 2 2008 /usr/sbin/swagentd
78183 -r-xr-xr-x 1 bin bin 20480 Sep 7 2004 /usr/sbin/swapinfo
78025 -r-xr-xr-x 1 bin bin 28672 May 13 2004 /usr/sbin/swapon
78033 -r-sr-xr-x 11 root bin 2478080 Feb 16 2007 /usr/sbin/swask
78033 -r-sr-xr-x 11 root bin 2478080 Feb 16 2007 /usr/sbin/swconfig
78033 -r-sr-xr-x 11 root bin 2478080 Feb 16 2007 /usr/sbin/swcopy
78033 -r-sr-xr-x 11 root bin 2478080 Feb 16 2007 /usr/sbin/swinstall
78033 -r-sr-xr-x 11 root bin 2478080 Feb 16 2007 /usr/sbin/swjob
78033 -r-sr-xr-x 11 root bin 2478080 Feb 16 2007 /usr/sbin/swlist
78034 -r-sr-xr-x 2 root bin 1462272 Feb 16 2007 /usr/sbin/swmodify
78034 -r-sr-xr-x 2 root bin 1462272 Feb 16 2007 /usr/sbin/swpackage
78033 -r-sr-xr-x 11 root bin 2478080 Feb 16 2007 /usr/sbin/swreg
78033 -r-sr-xr-x 11 root bin 2478080 Feb 16 2007 /usr/sbin/swremove
78033 -r-sr-xr-x 11 root bin 2478080 Feb 16 2007 /usr/sbin/swverify
R.K. #
Honored Contributor

Re: sd commands (except swlist) failing on permissions

Hi Don,

How about checking file:
/var/adm/sw/security/secrets

Don't fix what ain't broke