Author: Liandrin
[ircu2.10.12-pk.git] / tools / README
1 /************************************************************************
2  *   IRC - Internet Relay Chat, ircd/crypt/README
3  *   Copyright (C) 1991 Nelson Minar
4  *
5  *   This program is free software; you can redistribute it and/or modify
6  *   it under the terms of the GNU General Public License as published by
7  *   the Free Software Foundation; either version 1, or (at your option)
8  *   any later version.
9  *
10  *   This program is distributed in the hope that it will be useful,
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *   GNU General Public License for more details.
14  *
15  *   You should have received a copy of the GNU General Public License
16  *   along with this program; if not, write to the Free Software
17  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19
20 The change implemented here is that the operator password in irc.conf
21 is no longer stored in plaintext form, but is encrypted the same way
22 that user passwords are encrypted on normal UNIX systems. Ie, instead
23 of having
24
25         O:*:goodboy:Nelson
26
27 in your ircd.conf file, you have
28
29         O:*:sCnvYRmbFJ7oI:Nelson
30
31 You still type "/oper Nelson goodboy" to become operator. However, if
32 someone gets ahold of your irc.conf file, they can no longer figure
33 out what the password is from reading it.  There are still other
34 security holes, namely server-server passwords, but this closes one
35 obvious problem.
36
37 So how do you generate these icky looking strings for passwords?
38 There's a simple program called mkpasswd to do that for you.  Just run
39 mkpasswd, and at the prompt type in your plaintext password.  It will
40 spit out the encrypted password, which you should then just copy into
41 the irc.conf file. This should be done only when adding new passwords
42 to your irc.conf file. To change over your irc.conf file to use
43 encrypted passwords, define CRYPT_OPER_PASSWORD in config.h. You will
44 need to recompile your server if you already compiled it with this
45 feature disabled. Once compiled, edit the Makefile in this directory
46 and chang "IRCDCONF" to your irc.conf file. Then "make install" in this
47 directory to replace all the operator passwords in your irc.conf file
48 with the encrypted format.
49
50 Choose your passwords carefully. Do not choose something in a
51 dictionary, make sure its at least 5 characters. Anything past 8
52 characters is ignored.
53
54 One thing to note about crypt() passwords - for every plaintext, there
55 are 4096 different passwords. Some valid encryptions of "goodboy"
56 include t1Ub2RhRQHd4g sCnvYRmbFJ7oI and Xr4Z.Kg5tcdy6. The first
57 two characters (the "salt") determine which of the 4096 passwords
58 you will get. mkpasswd chooses the salt randomly, or alternately
59 will let you specify one on the command line.
60
61 see also - crypt(3)