Operating System - HP-UX
1843997 Members
2329 Online
110226 Solutions
New Discussion

Unable to install software, even though I have sudo previleges.

 
SOLVED
Go to solution
GnanaShekar
Regular Advisor

Unable to install software, even though I have sudo previleges.

Hi,

I am unable to install software, even though I have sudo previleges.

Please suggest.

$ id
uid=20891(gsubrama) gid=601(units)

$ sudo -l
User gsubrama may run the following commands on this host:
(ALL) ALL

$ swlist -s /tmp/javaz/jdk15_15008_ia.depot
# Initializing...
# Contacting target "lciahp10"...
#
# Target: lciahp10:/tmp/javaz/jdk15_15008_ia.depot
#

#
# Bundle(s):
#

Java15JDK 1.5.0.08.00 Java 1.5 JDK for HP-UX

$ sudo swinstall -s /tmp/javaz/jdk15_15008_ia.depot Java15JDK

======= 06/11/07 08:47:23 EDT BEGIN swinstall SESSION
(non-interactive) (jobid=lciahp10-0015)

* Session started for user "root@lciahp10".

* Beginning Selection
* Target connection succeeded for "lciahp10:/".
ERROR: "lciahp10:/tmp/javaz/jdk15_15008_ia.depot": You do not have
the required permissions to perform this operation. 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.
* Source connection failed for
"lciahp10:/tmp/javaz/jdk15_15008_ia.depot".
WARNING: More information may be found in the daemon logfile on this
target (default location is
lciahp10:/var/adm/sw/swagentd.log).
* Selection had errors.



======= 06/11/07 08:47:24 EDT END swinstall SESSION (non-interactive)
(jobid=lciahp10-0015)

Thanks & Regards,
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: Unable to install software, even though I have sudo previleges.

Shalom,

If the user truly has sudo for all programs, its really a root user. Might as well just give the user root and let her do the install.

You are better off configuring sudo for the specific command required here. swlist swinstall swremove

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
Ivan Krastev
Honored Contributor

Re: Unable to install software, even though I have sudo previleges.

First try to become root:
sudo su -

and after that try to install Java:
swinstall -s /tmp/javaz/jdk15_15008_ia.depot Java15JDK

If this fail check your network settings and resolving.

regards,
ivan
GnanaShekar
Regular Advisor

Re: Unable to install software, even though I have sudo previleges.

Hi,

Even as root I am unable to install the applications. Please suggest.

$ sudo su -
Password:
Value of TERM has been set to "xterm".
WARNING: YOU ARE SUPERUSER !!

# id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)


# swacl -l depot
#
# swacl Depot Access Control List
#
# For depot: lciahp10:/var/spool/sw
#
# Date: Mon Jun 11 09:49:00 2007
#

ERROR: You are not authorized to perform the requested operation on
the "depot" ACL at "lciahp10:/var/spool/sw". 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.)


# swlist -s /tmp/javaz/jdk15_15008_ia.depot
# Initializing...
# Contacting target "lciahp10"...
#
# Target: lciahp10:/tmp/javaz/jdk15_15008_ia.depot
#

#
# Bundle(s):
#

Java15JDK 1.5.0.08.00 Java 1.5 JDK for HP-UX


# swinstall -s /tmp/javaz/jdk15_15008_ia.depot Java15JDK

======= 06/11/07 09:49:40 EDT BEGIN swinstall SESSION
(non-interactive) (jobid=lciahp10-0016)

* Session started for user "root@lciahp10".

* Beginning Selection
* Target connection succeeded for "lciahp10:/".
ERROR: "lciahp10:/tmp/javaz/jdk15_15008_ia.depot": You do not have
the required permissions to perform this operation. 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.
* Source connection failed for
"lciahp10:/tmp/javaz/jdk15_15008_ia.depot".
WARNING: More information may be found in the daemon logfile on this
target (default location is
lciahp10:/var/adm/sw/swagentd.log).
* Selection had errors.



======= 06/11/07 09:49:41 EDT END swinstall SESSION (non-interactive)
(jobid=lciahp10-0016)




# swacl -l host
#
# swacl Host Access Control List
#
# For host: lciahp10
#
# Date: Mon Jun 11 09:52:08 2007
#

ERROR: You are not authorized to perform the requested operation on
the "host" ACL at "lciahp10:/". 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.)


# pwd
/var/adm/sw/security
# ls
_ACL _OWNER _PROD_DFLT_ACL _SOC_DFLT_ACL secrets secrets.dir secrets.pag

# more _ACL
# default_realm=hpux
any_other:r----
#


Thanks & Regards,
Bill Hassell
Honored Contributor
Solution

Re: Unable to install software, even though I have sudo previleges.

Did you recently change hostname, IP address or did someone change your DNS server? Restart the swagentd daemon (kill swagentd the start it again with: swagentd -r).



Bill Hassell, sysadmin
GnanaShekar
Regular Advisor

Re: Unable to install software, even though I have sudo previleges.

Hi,

Thanks a lot.
I restarted the swagentd daemon (/sbin/swagentd stop, /sbin/swagentd start). I was then able to install the java.

However I still continue to get a warning for:

$ sudo swacl -l host
#
# swacl Host Access Control List
#
# For host: lciahp10
#
# Date: Tue Jun 12 01:00:33 2007
#

WARNING: An attempt to get the network host entry for "hpux" failed.
This may result in denial of access to users and agents at
this host. Check the spelling of this name, then your
"/etc/hosts" file, or your "/etc/resolv.conf" file and DNS
resolver configuration. The nslookup program may be helpful
in isolating this problem.
# Object Ownership: User= root
# Group=sys
# Realm=hpux
#
WARNING: An attempt to get the network host entry for "hpux" failed.
This may result in denial of access to users and agents at
this host. Check the spelling of this name, then your
"/etc/hosts" file, or your "/etc/resolv.conf" file and DNS
resolver configuration. The nslookup program may be helpful
in isolating this problem.
# default_realm=hpux
any_other:-r---

Wondering how to change the default_realm name? Please suggest,
Thanks & REgards.
Ivan Krastev
Honored Contributor

Re: Unable to install software, even though I have sudo previleges.

Hi,

see message "WARNING: An attempt to get the network host entry for "hpux" failed."

You have a problem with host resolving. Try to add this host (hpux) in /etc/hosts file and restart swagentd daemon.


regards,
ivan
GnanaShekar
Regular Advisor

Re: Unable to install software, even though I have sudo previleges.

Hi,

My servers hostname is not "hpux". Please let me know, how I change the name of default_realm to "lciahp10".

$ hostname
lciahp10
$ nslookup lciahp10
Using /etc/hosts on: lciahp10

looking up FILES
Name: lciahp10
Address: 172.20.96.88

$ nslookup 172.20.96.88
Using /etc/hosts on: lciahp10

looking up FILES
Name: lciahp10
Address: 172.20.96.88

Thanks & Regards,
Marcel Burggraeve
Trusted Contributor

Re: Unable to install software, even though I have sudo previleges.

Check your hostname in /etc/rc.config.d/netconf

Your hostname can be found in
/etc/hosts
/etc/rc.config.d/netconf
DNS servers if used are in
/etc/resolv.conf
Search order for name resolution if used in
/etc/nsswitch.conf

Make sure information in all those files is correct.