Operating System - HP-UX
1751691 Members
4534 Online
108781 Solutions
New Discussion юеВ

Please Help: All sw* commands show error Not Owner

 
SOLVED
Go to solution
stalucia
Advisor

Please Help: All sw* commands show error Not Owner


I'm not able to run any sw command like swlist, swinstall etc etc as root, it gives me the error "Not Owner"...
# id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users),100(informix),201(dessiis)

# /usr/sbin/swlist
bash: /usr/sbin/swlist: Not owner

# ls -la /usr/sbin/sw*
-rwsr-sr-x 11 root bin 6057568 Mar 26 2007 /usr/sbin/swacl
-r-sr-xr-x 1 bin bin 2016208 Mar 26 2007 /usr/sbin/swagentd
-r-sr-xr-x 1 bin bin 35180 Mar 26 2004 /usr/sbin/swapinfo
-r-sr-xr-x 1 bin bin 73060 May 30 2005 /usr/sbin/swapon
-rwsr-sr-x 11 root bin 6057568 Mar 26 2007 /usr/sbin/swask
-rwsr-sr-x 11 root bin 6057568 Mar 26 2007 /usr/sbin/swconfig
-rwsr-sr-x 11 root bin 6057568 Mar 26 2007 /usr/sbin/swcopy
-rwsr-sr-x 11 root bin 6057568 Mar 26 2007 /usr/sbin/swinstall
-rwsr-sr-x 11 root bin 6057568 Mar 26 2007 /usr/sbin/swjob
-rwsr-sr-x 11 root bin 6057568 Mar 26 2007 /usr/sbin/swlist
-r-sr-xr-x 2 root bin 3998728 Mar 26 2007 /usr/sbin/swmodify
-r-sr-xr-x 2 root bin 3998728 Mar 26 2007 /usr/sbin/swpackage
-rwsr-sr-x 11 root bin 6057568 Mar 26 2007 /usr/sbin/swreg
-rwsr-sr-x 11 root bin 6057568 Mar 26 2007 /usr/sbin/swremove
-rwsr-sr-x 11 root bin 6057568 Mar 26 2007 /usr/sbin/swverify

What's the problem???
24 REPLIES 24
Uday_S_Ankolekar
Honored Contributor

Re: Please Help: All sw* commands show error Not Owner

Did you try stop and restart swagent?

/usr/sbin/swagent -k to stop and -r to restart

you can also try /sbin/init.d/swagent stop |start

-USA
Good Luck..
Steven E. Protter
Exalted Contributor

Re: Please Help: All sw* commands show error Not Owner

Shalom,

The problem is not ownership.

Its either as noted swagentd or /etc/nsswitch.conf is missing or misconfigured.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
TTr
Honored Contributor

Re: Please Help: All sw* commands show error Not Owner

Is this on HP-UX? Can you try with the standard shell for root /sbin/sh and with a direct login to root?
Google shows many hits on this, all with bash. None of the ones I looked had a clear answer though.
Bob E Campbell
Honored Contributor

Re: Please Help: All sw* commands show error Not Owner

Just deleted a long response, short version is:

1. Did you replaces /sbin/sh with bash?

2. Did you define a rootb user or change the root user shell?

3. If you did neither, what happens when you run the command "/sbin/sh exec swlist"
stalucia
Advisor

Re: Please Help: All sw* commands show error Not Owner

Hello, thanks for reply but nothing seems to work :-s

I changed the owner of swagent from bin to root so i was able to restart it but still getting the same error... tried with /sbin/sh:

/sbin/sh exec swlist
/sbin/sh: swlist: Execute permission denied.

anything else i should try?


cat /etc/nsswitch.conf
#
# /etc/nsswitch.compat:
#
# @(#)B11.23_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#

passwd: files
group: files
hosts: files dns
ipnodes: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
services: files
Dennis Handly
Acclaimed Contributor

Re: Please Help: All sw* commands show error Not Owner

>/sbin/sh: swlist: Execute permission denied.

Could you have changed the permissions on the shlibs that swlist needs?
$ chatr /usr/sbin/swlist
/usr/sbin/swlist:
32-bit ELF executable
shared library list:
libpthread.so.1
libdcekt.so.1
libc.so.1
libobam.so.1
libm.so.1
Look at these.
What does this show: ldd /usr/sbin/swlist
Bob E Campbell
Honored Contributor

Re: Please Help: All sw* commands show error Not Owner

I have a feeling most of the commands I would ask you to run would not work (notice the link counts in your listing). I think that Dennis is on to something as your commands are OK and it fails in a standard shell.

Can you tell us how much customization was done on the system? Look in the file /var/adm/sw/swagent.log for the must recent "successful" job and then try and remember what was modified since then.

If you have a second HP-UX system that is well behaved, try the command:

# swlist @ systemWithAProblem

Tingli
Esteemed Contributor

Re: Please Help: All sw* commands show error Not Owner

How about restart /usr/sbin/swagentd -r?
stalucia
Advisor

Re: Please Help: All sw* commands show error Not Owner


Dennis,

# chatr /usr/sbin/swlist
/usr/sbin/swlist:
32-bit ELF executable
shared library dynamic path search:
LD_LIBRARY_PATH disabled second
SHLIB_PATH disabled third
embedded path enabled first /var/adm/sw/lib:/usr/lib/sw/lib:/usr/obam/lib::
shared library list:
libpthread.so.1
libdcekt.so.1
libc.so.1
libobam.so.1
libm.so.1
shared library binding:
immediate nonfatal
global hash table disabled
shared library mapped private disabled
mem_check value disabled
shared library segment merging disabled
shared vtable support disabled
explicit unloading disabled
linkage table protection disabled
segments:
index type address flags size
5 text 04000000 z---c- D (default)
6 data 40000000 ---m-- D (default)
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr dereferences trap enabled
caliper dynamic instrumentation disabled


I compared the results with another system well behaved and the path/permissions of shared libraries seems to be ok.


# ldd /usr/sbin/swlist
ldd: Cannot execute "/usr/sbin/swlist", Not owner.