LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Disable .rhosts Support in /etc/pam.conf (https://www.linuxquestions.org/questions/linux-newbie-8/disable-rhosts-support-in-etc-pam-conf-780488/)

wjs1990 01-07-2010 03:58 AM

Disable .rhosts Support in /etc/pam.conf
 
Hi,

cd /etc
sed –e ‘s/^.*pam_rhosts_auth/#&/’ < /etc/pam.conf >
pam.conf.new
mv pam.conf.new pam.conf
pkgchk -f -n -p /etc/pam.conf

What does the "sed –e ‘s/^.*pam_rhosts_auth/#&/’" command actually means?

Regards
wjs

acid_kewpie 01-07-2010 04:08 AM

it says to put a # infront of any line that contains the phrase pam_rhosts_auth.

wjs1990 01-07-2010 04:20 AM

I see... so are there any commands that i can use to find out the line that contains the phrase "pam_rhosts_auth", but does not have the "#" infront of it.

acid_kewpie 01-07-2010 04:53 AM

well, i think the regex /^[^#].*pam_rhosts_auth/ should match those lines.

wjs1990 01-08-2010 03:21 AM

erm, sorry... i have tried removing the "#" from those phrase which contain the pam_rhosts_auth, but i did not get any result after using the command. why is that so?

Thanks.

acid_kewpie 01-08-2010 12:03 PM

You know, it helps if you actually ask a question rather than just asking why something undescribed isn't working. What result? What command?

wjs1990 01-09-2010 08:48 PM

i think i typed in the command cat /etc/pam.conf | awk '(/^[^#].*pam_rhosts_auth/)' . But it doesn't seems to return me anything even if i remove the "#" from the phrase. Did i use the syntax wrongly or? Please guide me. Thank you so much.

Regards
JS


All times are GMT -5. The time now is 03:24 PM.