httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: htpasswd
Date Fri, 09 Aug 2002 10:17:54 GMT
>From: Philippe Dhont (Sea-ro) [mailto:Philippe.Dhont@searo.be]
>
>I have a little problem;
>When i use
>Htpasswd -c /..../bla/blabla...
>I get the message:
>Htpasswd: -c and -n options conflict
>
>What's the cause of this? As i see it there is no connection 
>between -c and -n

You see wrong. "-c" means create a file and put the user/pass pairs in it. "-n" means send
the output to STDOUT. How can the program do both? They are mutually exclusive...

The normal procedure is:

- Make a file to begin with:

htpasswd -c mypasswords.pwd joe
	<type in password for joe>

this creates the file mypasswords.pwd with one user/pass pair (i.e. joe) inside.

- Later on, add more users:

htpasswd mypasswords.pwd jim
	<type in password for jim>

Note that there is now no "-c" switch since you no longer need to create the file since it
now exists. The user/pass for jim will be appended to the file which now contains a user/pass
pair for joe and jim.

If you use the "-n" option, you get the user/pass pair on STDOUT (this lets you use htpasswd
as a system call in a pipeline or shell-script or anything else), e.g.

htpasswd -n joe
	<type in password for joe>
joe:kjLNLO09.5W7

or all on the commandline (add the "-b" switch).

htpasswd -nb joe abcwxyz
joe:kjLNLO09.5W7


Rgds,

Owen Boyle

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message