changeset 1:0e3c9806a620

changes for centos7
author Carl Byington <carl@five-ten-sg.com>
date Thu, 02 Mar 2017 12:45:31 -0800
parents 524d6c83d8ad
children ecf6bac512ae
files Makefile google-authenticator.te
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Mar 01 10:08:26 2017 -0800
+++ b/Makefile	Thu Mar 02 12:45:31 2017 -0800
@@ -7,6 +7,7 @@
 m := google-authenticator.pp
 
 all:
+	yum -y install pam-devel selinux-policy-devel
 	rpmbuild --rebuild google-authenticator-1.0-0.gita096a62.fc24.6.src.rpm >mylog 2>&1
 	grep Wrote: mylog
 	make -f /usr/share/selinux/devel/Makefile
@@ -20,6 +21,12 @@
 	sed -i -e 's/^ChallengeResponseAuthentication no/ChallengeResponseAuthentication yes/g' /etc/ssh/sshd_config
 	service sshd restart
 
+install-centos7:
+	[ -f ${r} ] || /bin/false
+	yum -y install ${r}
+	sed -i -e 's/PAM-1.0/PAM-1.0\nauth		  required	   pam_google_authenticator.so nullok/g' /etc/pam.d/sshd
+	sed -i -e 's/^ChallengeResponseAuthentication no/ChallengeResponseAuthentication yes/g' /etc/ssh/sshd_config
+	systemctl restart sshd.service
 
 setup:
 	google-authenticator
--- a/google-authenticator.te	Wed Mar 01 10:08:26 2017 -0800
+++ b/google-authenticator.te	Thu Mar 02 12:45:31 2017 -0800
@@ -1,6 +1,6 @@
 # Name and version, every module should have this.
 
-policy_module(google_authenticator, 0.0.1)
+policy_module(google-authenticator, 0.0.1)
 
 
 # List of the types, class and everything else you are going to use in