From owner-freebsd-questions@FreeBSD.ORG Mon Mar 22 23:47:17 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3DD1106566C for ; Mon, 22 Mar 2010 23:47:17 +0000 (UTC) (envelope-from aaron.lewis1989@gmail.com) Received: from mail-pz0-f196.google.com (mail-pz0-f196.google.com [209.85.222.196]) by mx1.freebsd.org (Postfix) with ESMTP id A2E328FC08 for ; Mon, 22 Mar 2010 23:47:17 +0000 (UTC) Received: by pzk34 with SMTP id 34so11220pzk.3 for ; Mon, 22 Mar 2010 16:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=SSv/9f9wAsEJl06VY0mPjb2FoDWrqG37JjGNXKh8mAs=; b=VDNE68Cn/6TycATXfJ7rELgtgfQLMph9NQ1HNzyZdcJNbXGlPXb4nNehgZqI5umgtP pl24r30ffjn33p0tb0qroTFfX93+ESmxo8n2sUkXL2BabL71MdkxcAAq276dyDirsu2E I2kNQKtB4/jGPfwtm8cl6+G4ArYTiDvoNPXu8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=EUSx+xlMyl1kmL5t+I2ejDGq+A4m404LRq11mjgKEptzvRx049XLJ/lRf/dtRCiOZV NoAWFVx/iMkRt2P7ppT2ELy3s2ZlkK/3mVFt6hbO75BVI9xH5OFCAUdmrBekUmzUcnbH xoiwDhb3P9bsrx8RjAAVSJsbROpf/pcUHWPGc= Received: by 10.141.106.8 with SMTP id i8mr3376403rvm.30.1269301636965; Mon, 22 Mar 2010 16:47:16 -0700 (PDT) Received: from [10.7.16.42] ([58.58.36.2]) by mx.google.com with ESMTPS id 23sm77890pzk.10.2010.03.22.16.47.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 22 Mar 2010 16:47:16 -0700 (PDT) Message-ID: <4BA801A0.9090305@gmail.com> Date: Tue, 23 Mar 2010 07:47:44 +0800 From: Aaron Lewis User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Matthew Seaman References: <4BA7181B.7070708@gmail.com> <4BA75155.8090507@infracaninophile.co.uk> <4BA7668E.3000200@gmail.com> <4BA7843A.30201@infracaninophile.co.uk> In-Reply-To: <4BA7843A.30201@infracaninophile.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Weird Problems with User Home Directory , Asking for help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2010 23:47:17 -0000 Looks like i found the problem , i thought i've made a mistake. I shouldn't use `pw user add aaron' right ? That won't create user home directory , when i found i've got no home directory. So at that time , i created it and change the owner to my user. $ sudo tail -f /var/log/auth.log login: _secure_path: cannot stat /home/frozen/.login_conf: Permission denied // Strange , pay attention to user permissions below // I don't know why `stat' function fails .. $ ls -ld /home/frozen drwxr-xr-x 3 frozen frozen 512 Mar 5 22:36 /home/frozen/ $ ls -lah /home/frozen/.login_conf -rw-r--r-- 1 frozen frozen 171 Dec 3 14:34 /home/frozen/.login_conf BTW: ssh login with user frozen is fine. Matthew Seaman wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 22/03/2010 12:46:06, Aaron Lewis wrote: > >> Matthew Seaman wrote: >> >>> On 22/03/2010 07:11:23, Aaron Lewis wrote: >>> >>> >>>> Hello BSD hackers, >>>> I have a strange problems with user's home directory , if i log in >>>> through ssh , everything's fine. >>>> But on virtual terminals , it tolds me: >>>> >>>> no home directory >>>> Logging in with home dir "/" >>>> >>>> Does anyone has any ideas ? >>>> >>>> >>>> Here's some debug information >>>> ========================================= >>>> %> grep aaron /etc/passwd >>>> aaron:*:1001:1001:frozen:/home/aaron:/usr/local/bin/bash >>>> >>>> %> ls -ladh /home/aaron/ >>>> drwxr-xr-x 3 aaron aaron 512B Mar 5 22:36 /home/aaron >>>> ============================================ >>>> >>>> >>> What are the settings for >>> >>> ChallengeResponseAuthentication >>> UsePam >>> >>> in your /etc/ssh/sshd_config? >>> >>> >> Nothing found , or commented out. >> > > Commented out means using the default setting -- which is 'yes' for both > of those. ie. sshd is using the PAM system. Which means that PAM is > probably working just fine. > > >>> What are the contents of /etc/pam.d/login and /etc/pam.d/sshd ? >>> >>> >> # grep -v -e "^#" /etc/pam.d/sshd | sed '/^$/d' >> auth sufficient pam_opie.so no_warn no_fake_prompts >> auth requisite pam_opieaccess.so no_warn allow_local >> auth required pam_unix.so no_warn try_first_pass >> account required pam_nologin.so >> account required pam_login_access.so >> account required pam_unix.so >> session required pam_permit.so >> password required pam_unix.so no_warn try_first_pass >> > > These are also the default settings for sshd -- which as you say is working. > > >> # grep -v -e "^#" /etc/pam.d/login | sed '/^$/d' >> auth sufficient pam_self.so no_warn >> auth include system >> account requisite pam_securetty.so >> account required pam_nologin.so >> account include system >> session include system >> password include system >> > > Again, this is the default for login. I should have asked you for the > contents of /etc/pam.d/system as well, but if you say it's not been > modified I'll believe you. Hmmmm... > > >> It's all fresh install , did i do something wrong ? It's really strange >> .. never met before. >> > > Something is a bit fubar somewhere, yes. From the symptoms you > described, the immediate suspect would be the PAM system, but there are > no obvious configuration problems with what you've shown me. > > Is there anything notable in /var/log/auth.log from the failed console > logins? Can you try gratuitously creating another user account and > seeing if that is affected in the same way, or indeed if it makes any > difference to the original user account? > > Cheers, > > Matthew > > - -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > Kent, CT11 9PW > -----BEGIN PGP SIGNATURE----- > Version: GnuPG/MacGPG2 v2.0.14 (Darwin) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkunhDoACgkQ8Mjk52CukIwzBQCfccc1KXwscGDrHV2wn5Zr8xnO > pMAAnjJVpjZc39wczR4u8nYo/Kxpvivl > =3oJZ > -----END PGP SIGNATURE----- > -- Best Regards, Aaron Lewis - PGP: 0x4A6D32A0 FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0 irc: A4r0n on freenode