I am not sure if there is an easier way to do this but probably. I have several 25+ servers in which we had connected to AD using Samba and Winbind. On the servers that we no longer use Samba on the Samba packages were removed. I am trying to comment out the line that contained pam.winbind.so in the following files:
/etc/pam.d/common-auth
/etc/pam.d/common-account
/etc/pam.d/common-password
/etc/pam.d/common-session
I am running SUSE Linux Enterprise 11. I thought I could throw these lines in a bash script but they don't all run.
Code:
#!/bin/bash
sed -i '/auth required pam_winbind.so/,/<\/auth/s/^/#/' /etc/pam.d/common-auth
sed -i '/session required pam_winbind.so/,/<\/session/s/^/#/' /etc/pam.d/common-session
sed -i '/account required pam_winbind.so/,/<\/account/s/^/#/' /etc/pam.d/common-account
sed -i '/password required pam_winbind.so/,/<\/password/s/^/#/' /etc/pam.d/common-password
Just the first line works. I was trying to just comment out the line but now I am up to deleting them or whatever is easier and faster.
Any suggestions from the pros?
