Operating System - HP-UX
1837102 Members
2216 Online
110112 Solutions
New Discussion

Re: swpackage for non-root users

 
SOLVED
Go to solution
Prabu_3
Frequent Advisor

swpackage for non-root users

i am preparing depot package for a product. When I run swpackage (as non-root user), I am getting error message stating that I don't have permission to do so. Then I login as root user to run the swpackage command.

How can I run swpackage command as a non-root user?.
10 REPLIES 10
Sunil Sharma_1
Honored Contributor

Re: swpackage for non-root users

You can not acheive this directly but you can configure sam in restricted mode to acheive this.

Or you can use sudo and give permission on SD related caommand to user.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Prabu_3
Frequent Advisor

Re: swpackage for non-root users

I tried using swacl command to set the permission for non-root user, but it didn't help me.

Where can I get the sudo?.

can I know what changes need to be done through SAM?.
Sunil Sharma_1
Honored Contributor

Re: swpackage for non-root users


you can download sudo from http://software.hp.com

For sam.
login as root
start sam -r
select the user whom you want to give SD manager access
press OK
now it will show the different area's go to SD-UX select it and go to Action and enable access.

Again go to Action and save prevledge

now exit from sam

login as user
and run sam, you will get the SD-UX menu here and you can install pakage from here

sam may not be in path of user so run /usr/sbin/sam

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Muthukumar_5
Honored Contributor

Re: swpackage for non-root users

how do you try swpackage there on non-root user??

We can use non-root to package the file-sets with permission of same userid there.

Files created by SD have the uid and gid of the invoking user, and the mode of created files is set according to the invoking user's umask.

SD ACLs are ignored.

See swpackage.1m man page on run_as_superuser=true option.

Easy to suggest when don't know about the problem!
G. Vrijhoeven
Honored Contributor

Re: swpackage for non-root users

HI,

The swacl should work:

Did you try:

#swacl -l root -M user:@:a

Gideon
Prabu_3
Frequent Advisor

Re: swpackage for non-root users

I tried the following options :

1. enabling the permission through "sam -r" option. but it didn't work.(note: it didn't have any option for swpackage)

2. I tried running "swacl" command but that also failed.

3. I tried "-x run_as_superuser=true" but that also failed.
Muthukumar_5
Honored Contributor

Re: swpackage for non-root users

Prabhu,

SWACL will work there.

user $ swacl -l root
It will prompt error ( permission error )

Do this on super user as,

root # swacl -l host -M user::a
root # swacl -l root -M user::a

Now you can try on acl setted user as,

user $ swacl -l root
It will work now.

It will be having access to do this. Normally it will not given there. Now you are able to create package / install there.
Easy to suggest when don't know about the problem!
Prabu_3
Frequent Advisor

Re: swpackage for non-root users

When I ran

swacl -l root -M user::a
swacl -l host -M user::a

Now I am able to run the swpackage as a non-root user. But when the package is created, it is created with owner:group as root:sys. How can I change this behaviour?.
I want the package to be created in my userid:groupid permissions.

- prabu
G. Vrijhoeven
Honored Contributor
Solution

Re: swpackage for non-root users

Hi again Prabu,

Assigning points will motivate others to respond and indicate the usefullness of an answer to others reading your threat.

The answer to your question.. i do not know why you would like the depot/sdpackage file to be owned by any other user. The files in the depot /sdpackage will become of the user/groups specified in the psf file once installed using swinstall. I only use depot files/sdpackages for installation/distribution of software to multiple servers. You do not want users to be able to edit the depotfiles.

Regards,

Gideon
Michael Roberts_3
Honored Contributor

Re: swpackage for non-root users

You can create a serial depot (depot in a file) using:

swpackage -xmedia_type=tape -s psf @ /home/user/mydepot

You can swlist that depot, or swcopy it to a directory depot for remote installs.

You can also look at the SD docs for "non privledged user"
http://www.software.hp.com/products/SD_AT_HP/information_library.html

A graphical tool for swpackage is available at:
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=SwPkgBuilder
etouq ot hguone revelc ton m'i