Was doing automation test, trying to set up passwordless ssh between the dirver and couple of test nodes. it just didn't work with one rhel5 box. Finally find the solution:
[root@perlrh5-179 .ssh]# tail -n 10 /var/log/secure
Dec 4 12:39:56 perlrh5-179 sshd[9397]: Authentication refused: bad ownership or modes for directory /root
Dec 4 12:39:59 perlrh5-179 sshd[9398]: Connection closed by 10.200.58.179
...
log shows the issue was the permission of the root dir
drwxrwxr-x 20 root root 4096 Nov 25 10:08 root
change it to 700 and the issue was…
first we can use find's exec opiton
find . -name CVS -exec ls -dl {} \;
also we can use shell
for i in `find . -name CVS` ; do echo -n $i," "; done
change ls, echo to whatever suits you, like rm -rf
use strict;
use warnings;
{
my $str = "abcd\r\n";
$str =~ s/\r|\n//g;
print "[$str]";
}
{
my $str = "abcd\n";
$str =~ s/\r|\n//g;
print "[$str]";
}
{
my $str = "abcd\r";
$str =~ s/\r|\n//g;
print "[$str]";
}