LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 01-07-2010, 04:58 AM   #1
wjs1990
Member
 
Registered: Nov 2009
Posts: 30

Rep: Reputation: 15
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
 
Old 01-07-2010, 05:08 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
it says to put a # infront of any line that contains the phrase pam_rhosts_auth.
 
Old 01-07-2010, 05:20 AM   #3
wjs1990
Member
 
Registered: Nov 2009
Posts: 30

Original Poster
Rep: Reputation: 15
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.
 
Old 01-07-2010, 05:53 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
well, i think the regex /^[^#].*pam_rhosts_auth/ should match those lines.
 
Old 01-08-2010, 04:21 AM   #5
wjs1990
Member
 
Registered: Nov 2009
Posts: 30

Original Poster
Rep: Reputation: 15
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.
 
Old 01-08-2010, 01:03 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
You know, it helps if you actually ask a question rather than just asking why something undescribed isn't working. What result? What command?
 
Old 01-09-2010, 09:48 PM   #7
wjs1990
Member
 
Registered: Nov 2009
Posts: 30

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PAM and nsswitch.conf stand Linux - General 3 09-09-2011 11:25 AM
Using pam.d to disable KDE/Gnome sessions in the evening cleger Linux - Security 2 12-11-2008 11:44 PM
Disable PAM reverse lookups? TBKDan Linux - Security 5 08-31-2007 08:47 AM
How to modify PAM.d conf. files sunnycn Linux - General 0 05-20-2002 11:47 AM
Recompiling RH 7.1 to disable DMA support - chipset doesn't support properly arby73 Linux - Newbie 0 06-13-2001 11:17 AM


All times are GMT -5. The time now is 04:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration