:-->>
:-->>
:-->> : Does anyone know how to disable .rhosts files with fully disabling
:-->> : rsh/rlogin.
:-->>
:-->> : i was able to diable .rhosts but rsh/rlogin also failed to work.
:-->> : any suggestions would be welcome.
:-->>
:-->> : thanks
:-->>
:-->>
:-->> you could place an empty root-owned, chmod 600 file called .rhosts in
:-->> each user's home directory. that way, there would already be a .rhosts
:-->> file there that the user could not edit or remove.
:-->Except that you can delete it as an ordinary user
:-->[oversteer]/export/home/carl{1} : mkdir foo
:-->[oversteer]/export/home/carl{2} : cd foo
:-->[oversteer]/export/home/carl/foo{3} : l
:-->total 6
:-->drwx------ 2 carl staff 512 Jan 15 17:26 .
:-->drwx------ 23 carl other 1536 Jan 15 17:26 ..
:-->[oversteer]/export/home/carl/foo{4} : su
:-->Password:
:--># touch .rhosts
:--># exit
:-->[oversteer]/export/home/carl/foo{5} : l
:-->total 6
:-->drwx------ 2 carl staff 512 Jan 15 17:27 .
:-->drwx------ 23 carl other 1536 Jan 15 17:26 ..
:-->-rw------- 1 root other 0 Jan 15 17:27 .rhosts
:-->[oversteer]/export/home/carl/foo{6} : rm .rhosts
:-->rm: .rhosts: override protection 600 (yes/no)? y
:-->[oversteer]/export/home/carl/foo{7} : l
:-->total 6
:-->drwx------ 2 carl staff 512 Jan 15 17:27 .
:-->drwx------ 23 carl other 1536 Jan 15 17:26 ..
:-->[oversteer]/export/home/carl/foo{8} :
:-->Remember, root may own the file, but the user owns the directory
:-->listing (file), and can do what they want to it. Read those
:-->basic UNIX books again :) (and test anything before you claim it's
:-->a solution, it's a bummer to be wrong in public :) )
Ok, how about this:
01/15/1998{288}/home/foo/9:23:su
Password:
# mkdir .rhoststest [I didn't want to wipe out my .rhosts]
# touch .rhoststest/.rhosts
# ls -ld .rhoststest .rhoststest/.rhosts
drwx------ 2 root other 512 Jan 15 09:24 .rhoststest
-rw------- 1 root other 0 Jan 15 09:24 .rhoststest/.rhosts
# exit
01/15/1998{289}/home/foo/9:24:rmdir .rhoststest
rmdir: directory ".rhoststest": Directory not empty
01/15/1998{290}/home/foo/9:24:cd .rhoststest
.rhoststest: Permission denied.
01/15/1998{291}/home/foo/9:24:rm .rhoststest/.rhosts
.rhoststest/.rhosts: Permission denied
[wait, what about rm -rf?]
01/15/1998{292}/home/foo/9:24:rm -rf .rhoststest
rm: cannot read directory .rhoststest: Permission denied
01/15/1998{293}/home/foo/9:27:rm -rf .rhoststest/.rhosts
01/15/1998{294}/home/foo/9:34:rmdir .rhoststest
rmdir: directory ".rhoststest": Directory not empty
01/15/1998{295}/home/foo/9:35:su
Password:
# cd .rhoststest
# ls -a
. .. .rhosts
:-->To deal with .rhosts, you need to hack the code for it. Under SunOS,
:-->it wasn't too hard to make Berkeley r**** compile, and of course,
:-->change its behaviour accordingly. It's probably possible to
:-->compile it under Solaris 2, but I imagine it's a bit harder :)
:-->Does PAM offer a less-fun solution?
--
no signature file