updated on Fri Jan 20 16:18:17 UTC 2012
[aur-mirror.git] / otpw / otpw.install
blobaf7f94e1983c6ed51c095973f80141dd78da2c68
1 post_install() {
2   
3   cat << 'EOM'
5 How to set up OTPW under arch linux?
7 1) Install this package
8 2) Change /etc/ssh/sshd_config file and set "yes" in line:
9 UsePAM yes
10 (it's 73rd line in untouched config file)
11 3) Change /etc/pam.d files to use owtp. I've changed only sshd and now
12 it looks like:
13 </etc/pam.d/sshd begins>
14 #%PAM-1.0
15 #auth           required        pam_securetty.so        #Disable remote root
17 auth            sufficient      pam_otpw.so
18 auth            required        pam_unix.so
19 auth            required        pam_nologin.so
20 auth            required        pam_env.so
22 account         required        pam_unix.so
23 account         required        pam_time.so
25 password        required        pam_unix.so
27 session         optional        pam_otpw.so
28 session         required        pam_unix_session.so
29 session         required        pam_limits.so
30 </etc/pam.d/sshd ends>
31 for more information look at pam guide: 
32 http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam.html
33 and OTPW homepage: http://www.cl.cam.ac.uk/~mgk25/otpw.html
36 The only thing the user have to do to use OTPW 
37 is to generate passwords using otpw-gen 
39 Janek 'benetnash' Polak  
41 EOM
44 post_upgrade() {
45   /sbin/ldconfig
47   cat << 'EOM'
48   
49 How to set up OTPW under arch linux?
51 1) Install this package
52 2) Change /etc/ssh/sshd_config file and set "yes" in line:
53 UsePAM yes
54 (it's 73rd line in untouched config file)
55 3) Change /etc/pam.d files to use owtp. I've changed only sshd and now
56 it looks like:
57 </etc/pam.d/sshd begins>
58 #%PAM-1.0
59 #auth           required        pam_securetty.so        #Disable remote root
61 auth            sufficient      pam_otpw.so
62 auth            required        pam_unix.so
63 auth            required        pam_nologin.so
64 auth            required        pam_env.so
66 account         required        pam_unix.so
67 account         required        pam_time.so
69 password        required        pam_unix.so
71 session         optional        pam_otpw.so
72 session         required        pam_unix_session.so
73 session         required        pam_limits.so
74 </etc/pam.d/sshd ends>
75 for more information look at pam guide: 
76 http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam.html
77 and OTPW homepage: http://www.cl.cam.ac.uk/~mgk25/otpw.html
80 The only thing the user have to do to use OTPW 
81 is to generate passwords using otpw-gen 
83 Janek 'benetnash' Polak  
84   
85 EOM
87   
88 post_remove() {
89   echo "Remember to restore pam configs!"
91       
92 op=$1
93 shift
94 $op "$@"