Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Aug 2002 23:49:52 -0400
From:      Brian McCann <bjm1287@ritvax.isc.rit.edu>
To:        'Adam Weinberger' <adam@vectors.cx>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   RE: htpasswd / Apache
Message-ID:  <000401c23f57$d1bc5300$2e00a8c0@dogbert>
In-Reply-To: <20020809033002.GJ49844@vectors.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
Sweetness.  I read something about sed a while back...but I'll look into
it more.  Guess I should break out my Sed & Awk book...bought it just
for Awk...never bothered lookin at Sed just due to lack of interest. :-/
Thanks a bunch.

--Brian

-----Original Message-----
From: Adam Weinberger [mailto:adam@vectors.cx] 
Sent: Thursday, August 08, 2002 11:30 PM
To: Brian McCann
Cc: 'Adam Weinberger'; freebsd-questions@FreeBSD.ORG
Subject: Re: htpasswd / Apache


sed is your friend.

if you're willing to do this through a bunch of (ba)sh calls, go ahead
and use sed... it's designed to do what you're looking for.

-Adam


>> (08.08.2002 @ 2024 PST): Brian McCann said, in 2.2K: <<
> Right.  That part I can do just using an option for the 'htpasswd' 
> command.  The problem comes when we try to change group memberships. 
> And...even though this is fairly easy...changing a PW and/or deleting 
> a user.  But the biggest thing is the group membership file.  I don't 
> know how to code the following:
> 
> (group file)
> Group1: user1 user2 user3
> Group2: user2 user4
> Group3: user1 user2 user4
> 
> Then how to delete user 2 out of everything, how to delete user4 out 
> of group2, and how to add user1 to group2...just as examples.  I know 
> it's got to be fairly easy..and if I finish the pages/scripts, I'd 
> gladly post them to the ports collection.  The way I was doing it was 
> using a web page as a front end, then having the web page (in php) 
> call a bash/awk script to actually do the work, so it's a little more 
> secure. Any ideas on how to code this?
> 
> Thanks,
> --Brian
> 
> -----Original Message-----
> From: owner-freebsd-questions@FreeBSD.ORG
> [mailto:owner-freebsd-questions@FreeBSD.ORG] On Behalf Of Adam 
> Weinberger
> Sent: Thursday, August 08, 2002 11:03 PM
> To: Brian McCann
> Cc: freebsd-questions@FreeBSD.ORG
> Subject: Re: htpasswd / Apache
> 
> 
> you want the crypt function.
> 
> remember, an htpasswd line is simply:
> 
> $username:crypt($password, $salt)
> 
> -Adam
> 
> 
> >> (08.08.2002 @ 1957 PST): Brian McCann said, in 1.9K: <<
> > 
> >    Hi all.  I have a question for everyone using Apache out there.
> I've
> >    spent a few days trying to write a set of PHP/Bash scripts that
> will
> >    edit the htpasswd file and htgroup files for Apache, and it's
> getting
> >    old fast.  I'm hitting quite a few road blocks, and getting blown
> away
> >    in awk and bash code.  Does anyone know of any ports or something
> that
> >    would allow me to add, delete, change PWs, and edit group
> membership
> >    via a web interface?
> > 
> > 
> > 
> >    Thanks,
> > 
> >    --Brian
> >> end of "htpasswd / Apache" from Brian McCann <<
> 
> 
> --
> "Oh good, my dog found the chainsaw."
>         -Lilo, "Lilo & Stitch"
> Adam Weinberger
> adam@vectors.cx
> http://vectors.cx
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 
>> end of "RE: htpasswd / Apache" from Brian McCann <<


--
"Oh good, my dog found the chainsaw."
        -Lilo, "Lilo & Stitch"
Adam Weinberger
adam@vectors.cx
http://vectors.cx


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000401c23f57$d1bc5300$2e00a8c0>