On Tue, Jul 05, 2005 at 04:13:18PM +0200, Marc Haber wrote: > On Tue, Jun 28, 2005 at 03:17:29PM +0200, Marc Haber wrote: > > shadow maintainers, would you be willing to make the case of "no > > shadow passwords in use, chage will fail" easily detectable from > > inside adduser? Or am I better off by jumping through hoops in adduser > > to find out whether shadow passwords are in use? > > Unfortunately, the shadow maintainers haven't replied to this message > which was also sent to [EMAIL PROTECTED] I am thus cloning the bug to > shadow. > > Shadow maintainers, please consider adding a switch to chage which > doesn't make chage fail if no shadow passwords are in use.
Since the shadow maintainers at least gave it a distinct exit code, I added a really cheap and nasty hack in Ubuntu to work around this; since the whole situation broke debootstrap, it was blocking a lot of my work, and I had to do something urgently ... &systemcall('/bin/sh', '-c', '/usr/bin/chage -M 99999 ' . quotemeta($new_name) . '; RET=$?; [ $RET -eq 3 ] && exit 0; exit $RET'); I don't know if this is the approach you want to take; a flag to chage to suppress the error message would certainly be neater, but as has been mentioned it would require a versioned dependency. Cheers, -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]