How do I change the password of a gbde lock?
Allan Fields
bsd at afields.ca
Tue Dec 14 14:18:34 PST 2004
On Fri, Dec 10, 2004 at 03:14:59AM +0100, Frank J. Beckmann wrote:
> # gbde init /dev/ad4s4h -i -L /etc/gbde/ad4s4h.lock
> # gbde attach ad4s4h -l /etc/gbde/ad4s4h.lock
> # newfs -U /dev/ad4s4h.bde
> # mount /dev/ad4s4h.bde /secure
> ...
> # umount /secure
> # gbde detach ad4s4h
>
> That was easy. Then I tried:
>
> # gbde setkey ad4s4h -l /etc/gbde/ad4s4h.lock -L /etc/gbde/ad4s4h.lock
> gbde: Error 22 decrypting lock
>
> Ofcourse I typed the password, when ist asked me.
Did you type it incorrectly? What release?
You seem to show {non-exist,corrupt} lock sectors, which can result
from bad passphrase.
src/sys/geom/bde/g_bde_lock.c:
370: /* If it points ito thin blue air, forget it */
371: if (off + G_BDE_LOCKSIZE > (uint64_t)mediasize) {
372: off = 0;
373: return (EINVAL);
374: }
...
435: /* If we have an unsorted lock-sequence, refuse */
436: for (i = 0; i < G_BDE_MAXKEYS - 1; i++)
437: if (gl->lsector[i] >= gl->lsector[i + 1])
438: return (EINVAL);
/usr/include/sys/errno.h:
77:#define EINVAL 22 /* Invalid argument */
> --
> Tsch?ss
> Frank
--
Allan Fields, AFRSL - http://afields.ca
2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541
More information about the freebsd-geom
mailing list