[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Correct Syntax for Setting and Modifying a Principal's Password Expiration Time.
Hello Michael,
If you look a little bit further down it parses the date. However,
strptime() is
not really consistant over diffrent implementations, so it needs some
more
help (that I just commited to HEAD).
Love
22 dec 2006 kl. 17.15 skrev Michael B Allen:
> The kadmin/util.c:str2time_t function would have to be modified.
>
> 176 int
> 177 str2time_t (const char *str, time_t *t)
> 178 {
> 179 const char *p;
> 180 struct tm tm, tm2;
> 181
> 182 memset (&tm, 0, sizeof (tm));
> 183
> 184 if(strcasecmp(str, "never") == 0) {
> 185 *t = 0;
> 186 return 0;
> 187 }
> 188
> 189 if(strcasecmp(str, "now") == 0) {
> 190 *t = time(NULL);
> 191 return 0;
> 192 }
> 193
> 194 p = strptime (str, "%Y-%m-%d", &tm);
>
> On Fri, 22 Dec 2006 09:27:26 -0600
> "Matt Proud" <matt.proud.list@gmail.com> wrote:
>
>> Hi,
>>
>> I am running Heimdal 0.7.1, and I am having some trouble using the
>> kadmin's principal modification mechanisms when it pertains to
>> password expiration dates.
>>
>> I have seen that when adding a principal that the time can be set in
>> "YYYY-MM-DD [HH:MM:SS]" format from the "add" command. I would like
>> the granularity of YYYY-MM-DD HH:MM:SS, but kadmin complains that the
>> syntax is wrong when I use this.
>>
>> When 'add --pw-expiration-time=2006-12-23 13:00:00 principal,' kadmin
>> wants to add two principals: 13:00:00 and principal.
>>
>> When "add --pw-expiration-time='2006-12-23 13:00:00' principal," it
>> complains that it cannot parse the value properly:
>> Unable to parse time "'2006-12-23"
>> Print date on format YYYY-mm-dd [hh:mm:ss]
>> kadmin: unable to parse `'2006-12-23'
>> kadmin: adding 13:00:00': Operation not permitted
>>
>> When 'add --pw-expiration-time="2006-12-23 13:00:00" principal,' it
>> complains that it cannot parse the value properly:
>> Unable to parse time ""2006-12-23"
>> Print date on format YYYY-mm-dd [hh:mm:ss]
>> kadmin: unable to parse `"2006-12-23'
>> kadmin: adding 13:00:00": Operation not permitted
>>
>> When 'add --pw-expiration-time=2006-12-23\ 13:00:00' principal,' it
>> attempts to add two principals: 13:00:00 and principal.
>>
>> I have the same problem when modifying a principal, too. Can somebody
>> enlighten me on what I am doing wrong?
>>
>> Thank you,
>>
>> Matt
>>
>
>
> --
> Michael B Allen
> PHP Active Directory SSO
> http://www.ioplex.com/