Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I can login to my machine (FreeBSD 9.1-RELEASE) for any user (for example: root or operator or any that exists in /etc/passwd) with any random password that I type...

I tried to reset password for root with passwd, but again if I try to login I can login with any random password that I type in... strange.

This ONLY works when I login directly from tty. When trying to log in via SSH, everything is as it should be - I need to give correct password to log in. How to fix this?

EDIT: Contents of /etc/ttys:

# name  getty                           type    status          comments
#
# If console is marked "insecure", then init will ask for the root password
# when going to single-user mode.
console none                            unknown off secure
#

console none                            unknown off secure
#
ttyv0   "/usr/libexec/getty Pc"         xterm   on  secure
# Virtual terminals
ttyv1   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv2   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv3   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv4   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv5   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv6   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv7   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv8   "/usr/local/bin/xdm -nodaemon"  xterm   off secure
# Serial terminals
# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
ttyu0   "/usr/libexec/getty std.9600"   dialup  off secure
ttyu1   "/usr/libexec/getty std.9600"   dialup  off secure
ttyu2   "/usr/libexec/getty std.9600"   dialup  off secure
ttyu3   "/usr/libexec/getty std.9600"   dialup  off secure
# Dumb console
dcons   "/usr/libexec/getty std.9600"   vt100   off secure
share|improve this question

migrated from serverfault.com Jul 16 '13 at 16:24

This question came from our site for professional system and network administrators.

    
Check your /etc/inittab, what are the lines for e.g. tty1? –  ott-- Jul 16 '13 at 9:14
    
Sorry, but there is no /etc/inittab. –  Mark Zakred Jul 16 '13 at 9:21
    
I missed the freebsd hint. Is there something in /etc/ttys? –  ott-- Jul 16 '13 at 9:31
1  
Compare the auth lines /etc/pam.d/login and /etc/pam.d/system to /etc/pam.d/sshd also it is /usr/bin/login not /bin/login –  Craig Jul 16 '13 at 14:30
4  
You should post the result of this discussion as answer. –  maxschlepzig Jul 17 '13 at 6:04
show 9 more comments

1 Answer

Edit /etc/ttys so that the line:

console none                            unknown off secure

is replaced with:

console none                            unknown off insecure

Also, you should have only one console line in your config.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.