8547bd53646284fabc2797e76126b028797ee6c8
[ircu2.10.12-pk.git] / tools / README
1 /************************************************************************
2  *   IRC - Internet Relay Chat, tools/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 ircd.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. To
39 compile mkpasswd, just "make -f Makefile.crypt" in this directory. After it
40 compiles, just run mkpasswd, and at the prompt type in your plaintext passwor\
41 d.
42 It will spit out the encrypted password, which you should then just copy
43 into your ircd.conf file. This should be done only when adding new passwords
44 to your ircd.conf file. Crypting of oper passwords is automatically done
45 with the new F:lines so there is nothing to enable to be able to use
46 crypted oper passwords. All you have to do is edit the Makefile.crypt in this
47 directory and change "IRCDCONF = /usr/local/lib/irc/ircd.conf" to the full
48 path to your ircd.conf file. Then "make -f Makefile.crypt install" in this
49 directory to replace all the operator passwords in your ircd.conf file
50 with the encrypted format.
51
52 Choose your passwords carefully. Do not choose something in a
53 dictionary, make sure its at least 5 characters. Anything past 8
54 characters is ignored.
55
56 One thing to note about crypt() passwords - for every plaintext, there
57 are 4096 different passwords. Some valid encryptions of "goodboy"
58 include t1Ub2RhRQHd4g sCnvYRmbFJ7oI and Xr4Z.Kg5tcdy6. The first
59 two characters (the "salt") determine which of the 4096 passwords
60 you will get. mkpasswd chooses the salt randomly, or alternately
61 will let you specify one on the command line.
62
63 see also - crypt(3)