On 10/15/12 05:18 AM, Teh, Rick wrote:
I am trying to remain polite and suggest the he forwards the SR to the pkg team

Yes, this is the right thing to do.

I would have expected to see an actual error message reported,
rather than a python stack trace.

That was my expectation too, a nice message and return code, not a stack trace.

Exactly. pkg(1) is correct to raise an error here, but it should be wrapping it appropriately. If the bug could be sent on to us, we'll work on it.

        cheers,
                        tim

The Support person said

   This is not a bug because:
   1) the pkg utility points to shadow file where the issue
      is so it clearly points on the issue
   2) As I explained you previously a user/administrator shouldn't
      modify those files, not only package commands will fail also
      other commands that need to modify/access those files.

On my system, /etc/shadow has the attribute 'preserve=true'
to indicate that user-supplied changes are to be kept. Is
your SOE package changing that attribute?

No my package wasn't changing the attribute.

file 36bab96f570ee3796305089aa4813ec3ac938e95 
chash=92cd68243071f165de315752d217bfac46bb1f3c group=sys mode=0400 owner=root 
path=etc/shadow pkg.csize=179 pkg.size=485 preserve=true

My package manifest had the line:
   user username=sally gcos-field="Sally SOE Tester" group=staff \
     home-dir=/export/home/sally login-shell=/usr/bin/bash \
     password=$5$0VhDwQtp$GgvxKHaAk4LOixSF4ctBLR1Rc.GZS91igB22t1o4hj0 uid=2550

But before the user sally could be created pkg bombed out because it found this 
line in /etc/shadow
   c788661:rJGaY9XjrJwxE:14159:15622::::::
The line has an extra colon because I was simulating a common operational 
cut-and-paste error.


When I took my package out of the equation, I was able to confirm that pkg(5) 
will report this error when using a genuine Solaris package. (The support 
person wasn't interested in this though).

To reproduce the error yourself, edit /etc/passwd and/or /etc/shadow, add or 
remove a colon from any line, then run
'pkg verify pkg:/system/network' or 'pkg fix pkg:/system/network'

Cheers,
Rick


_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to