Operating System - HP-UX
1754019 Members
7833 Online
108811 Solutions
New Discussion

swacl and swinstall does not work....

 
SOLVED
Go to solution
Anand Chauhan
Occasional Contributor

swacl and swinstall does not work....

Thanks Sanjay and Denver Osborne however I am still getting following errors EVEN IN ROOT PRIVILEGE. please help.........

1. ON ISSUING swinstall COMMAND I GET FOLLOWING ERROR MESSAGE :
swinstall -s /tmp/mysql-3.23.42-sd-11.00.depot \*

======= 09/05/02 22:05:37 CDT BEGIN swinstall SESSION
(non-interactive) (jobid=fia-0020)

* Session started for user "root@fia".

* Beginning Selection
ERROR: "fia:/": 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 "fia:/".
ERROR: More information may be found in the daemon logfile on this
target (default location is fia:/var/adm/sw/swagentd.log).
* Selection had errors.



======= 09/05/02 22:05:37 CDT END swinstall SESSION (non-interactive)
(jobid=fia-0020)
2. AND ON ISSUING ANY swacl COMMAND LIKE swacl -l root, swacl -l host, I GET FOLLOWING ERROR MESSAGE
Andy
1 REPLY 1
Michael Tully
Honored Contributor
Solution

Re: swacl and swinstall does not work....

Hopefully the answer is in here:
HTH
Michael

These errors can be caused by confusion within the Software Distributor. There are different
sources of confusion are usually cleared up by following these instructions:

1.Login as root

2.Move the directory /var/adm/sw/security and its contents to /var/adm/sw/security.old

mv /var/adm/sw/security /var/adm/sw/security.old

3.Make an new /var/adm/sw/security directory

mkdir /var/adm/sw/security

4.Change the owner of the /var/adm/sw/security directory

chown bin:bin security
5.Change the mode of the /var/adm/sw/security directory

chmod 755 security

6.If installing from a cdrom unmount the cd.

umount /cdrom

7.Change the mode of the cdrom mount direcotry.

chmod 777 /cdrom

8.Stop the swagentd daemon.

/sbin/init.d/swagentd stop

NOTE: Execute this command on both local and remote machines, if applicable.

9.Register the source as a depot:
If the file is on the local machine:

swreg -l depot /tmp/PHxx_yyyy.depot

If the cdrom is on local machine:

swreg -l depot /cdrom
If the cdrom is on remote machine:

swreg -l depot @ "hostname":/cdrom

10.Restart the swagentd daemon.

/sbin/init.d/swagentd start

NOTE: Execute this command on both local and remote machines, if applicable.

11.If installing from a cdrom remount the cd.

mount /cdrom

12.Now re-install the software. swinstall

Of course, these errors may actually be a function of a non-root user attempting to execute
swinstall or some other Software Distributor function. To allow a non-root user to install patches
read the following.

Description

The swacl mechanism protects all the different objects and actions that Software Distributor
(SD) knows about. Note that this is not the same thing as the similarly named file system ACLs
(Access Control Lists).

The man page for swacl(1) is not particularly detailed but gives an overview. The full details are
described in the CDROM manual Managing Software with HP-UX (B2355-90054). Take a
look at Chapter 8 Controlling Access to Software Objects. There are so many options that you
really need to go through the section, but the specific area you will need is Root ACLs. This
object is the one on which you need to open permissions.

To avoid the error, insert the permissions on the host object (not root object).

For example:

1.Write the host level for swacl to a file.

# swacl -l host > swacl.host

2.Display the new file:

# cat swacl.host

#
# swacl Host Access Control List
#
# For host: hpchs9
#
# Date: Mon Dec 29 17:39:08 1997
#
# Object Ownership: User= root
# Group=sys
# Realm=hpchs9.cup.hp.com
#
# default_realm=hpchs9.cup.hp.com
group:swadm:crwit
any_other:-r--t


3.Edit the file swacl.host

4.Give permissions to the desired user.

user:desired_username:a

Note: The a gives the user all permissions. Refer to the swacl(1) man page for
details on the more specific permissions such as read/write/insert etc.

EXAMPLE: To give permissions to user max:

user:max:a

5.Now swacl.host looks like this without the comments being displayed:

user:max:crwit
group:swadm:crwit
any_other:-r--t

6.Write this new version back into the system with the swacl command.

swacl -l host -F swacl.host

7.Go back to users swinstall session and select Action->Change Target.

8.Change the target to /tmp, for example.

Important: When testing this procedure, the files should be placed under /tmp
instead of /
Anyone for a Mutiny ?