Re: Weird Problems with User Home Directory , Asking for help

2010-03-23 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 22/03/2010 23:47:44, Aaron Lewis wrote:
 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.

pw user add is fine for creating accounts.  It should create the home
directory for you if given the right arguments.  Even so, just creating
the home directory by hand after creating the account should not be a
problem.

 $ 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

This means that the ownership/permissions of one of the directories in
the path up to /home/frozen is wrong. Implied is that it is possible for
non-root to substitute their own copy of /home/frozen/.login_conf
somehow.  What's the output from:

   ls -ld / /home

(Add /usr/home to that list if /home is a sym-link)

Is there anything unusual about how the filesystem is mounted?


// 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.

Which is a little disconcerting, because ssh is pretty anal about file
permissions itself, but it isn't triggering the problem here.

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/

iEYEARECAAYFAkuosQkACgkQ8Mjk52CukIyL+QCgib3JZkMQDsa1JmKg8rqFiIIp
EIYAniLNsh/lMANiJsFSbdx8oekEpMNR
=NlkH
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Weird Problems with User Home Directory , Asking for help

2010-03-23 Thread Aaron Lewis



$ 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



This means that the ownership/permissions of one of the directories in
the path up to /home/frozen is wrong. Implied is that it is possible for
non-root to substitute their own copy of /home/frozen/.login_conf
somehow.  What's the output from:

   ls -ld / /home

(Add /usr/home to that list if /home is a sym-link)

Is there anything unusual about how the filesystem is mounted?

  
Oops , it's a symbol link. 


[fro...@*** ~]$ ls -ld / /home /usr/home
drwxr-xr-x  19 root  wheel  512 Mar 23 07:48 /
lrwxr-xr-x   1 root  wheel8 Dec  3 14:34 /home - usr/home
drwxr-x---   4 root  wheel  512 Mar 23 07:39 /usr/home

I've just read sth. about Biba Model , `no read down, no write up' ,
It's default installation with a Custom Kernel , MAC enabled.

Attached Kernel Config File.

   
   // 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.



Which is a little disconcerting, because ssh is pretty anal about file
permissions itself, but it isn't triggering the problem here.

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/

iEYEARECAAYFAkuosQkACgkQ8Mjk52CukIyL+QCgib3JZkMQDsa1JmKg8rqFiIIp
EIYAniLNsh/lMANiJsFSbdx8oekEpMNR
=NlkH
-END PGP SIGNATURE-
  



--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode

cpu I686_CPU
ident   AARON

# To statically compile in device wiring instead of /boot/device.hints
#hints  GENERIC.hints # Default places to look for devices.

# Use the following to compile in values accessible to the kernel
# through getenv() (or kenv(1) in userland). The format of the file
# is 'variable=value', see kenv(1)
#
# env   GENERIC.env

makeoptions DEBUG=-g# Build kernel with gdb(1) debug symbols

options SCHED_ULE   # ULE scheduler
options PREEMPTION  # Enable kernel thread preemption
options INET# InterNETworking
options INET6   # IPv6 communications protocols
options SCTP# Stream Control Transmission Protocol
options FFS # Berkeley Fast Filesystem
options SOFTUPDATES # Enable FFS soft updates support
options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options UFS_GJOURNAL# Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
options NFSCLIENT   # Network Filesystem Client
options NFSSERVER   # Network Filesystem Server
options NFSLOCKD# Network Lock Manager
options NFS_ROOT# NFS usable as /, requires NFSCLIENT
options MSDOSFS # MSDOS Filesystem
options CD9660  # ISO 9660 Filesystem
options PROCFS  # Process filesystem (requires PSEUDOFS)
options PSEUDOFS# Pseudo-filesystem framework
options GEOM_PART_GPT   # GUID Partition Tables.
options GEOM_LABEL  # Provides labelization
options COMPAT_43TTY# BSD 4.3 TTY compat (sgtty)
options COMPAT_FREEBSD4 # Compatible with FreeBSD4
options COMPAT_FREEBSD5 # Compatible with FreeBSD5
options COMPAT_FREEBSD6 # Compatible with FreeBSD6
options COMPAT_FREEBSD7 # Compatible with FreeBSD7
options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
options KTRACE  # ktrace(1) support
options STACK   # stack(9) support
options SYSVSHM # SYSV-style shared memory
options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores
options P1003_1B_SEMAPHORES # POSIX-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B 

Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Aaron Lewis

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



--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Matthew Seaman
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?

What are the contents of /etc/pam.d/login and /etc/pam.d/sshd ?

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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Aaron Lewis

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.

What are the contents of /etc/pam.d/login and /etc/pam.d/sshd ?
  

# grep -v -e ^# /etc/pam.d/sshd | sed '/^$/d'
authsufficientpam_opie.sono_warn no_fake_prompts
authrequisitepam_opieaccess.sono_warn allow_local
authrequiredpam_unix.sono_warn try_first_pass
accountrequiredpam_nologin.so
accountrequiredpam_login_access.so
accountrequiredpam_unix.so
sessionrequiredpam_permit.so
passwordrequiredpam_unix.sono_warn try_first_pass

# grep -v -e ^# /etc/pam.d/login  | sed '/^$/d'
authsufficientpam_self.sono_warn
authincludesystem
accountrequisitepam_securetty.so
accountrequiredpam_nologin.so
accountincludesystem
sessionincludesystem
passwordincludesystem

It's all fresh install , did i do something wrong ? It's really strange 
.. never met before.

Cheers,

Matthew

  



--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Warren Block

On Mon, 22 Mar 2010, 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



Have you set up a jail?  The no home directory message appears in 
usr.sbin/jail/jail.c in 8-stable.


-Warren Block * Rapid City, South Dakota USA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Matthew Seaman
-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'
 authsufficientpam_opie.sono_warn no_fake_prompts
 authrequisitepam_opieaccess.sono_warn allow_local
 authrequiredpam_unix.sono_warn try_first_pass
 accountrequiredpam_nologin.so
 accountrequiredpam_login_access.so
 accountrequiredpam_unix.so
 sessionrequiredpam_permit.so
 passwordrequiredpam_unix.sono_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'
 authsufficientpam_self.sono_warn
 authincludesystem
 accountrequisitepam_securetty.so
 accountrequiredpam_nologin.so
 accountincludesystem
 sessionincludesystem
 passwordincludesystem

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.  H...

 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-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Aaron Lewis

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'
authsufficientpam_opie.sono_warn no_fake_prompts
authrequisitepam_opieaccess.sono_warn allow_local
authrequiredpam_unix.sono_warn try_first_pass
accountrequiredpam_nologin.so
accountrequiredpam_login_access.so
accountrequiredpam_unix.so
sessionrequiredpam_permit.so
passwordrequiredpam_unix.sono_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'
authsufficientpam_self.sono_warn
authincludesystem
accountrequisitepam_securetty.so
accountrequiredpam_nologin.so
accountincludesystem
sessionincludesystem
passwordincludesystem



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.  H...

  

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

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Adam Vande More
On Mon, Mar 22, 2010 at 6:47 PM, Aaron Lewis aaron.lewis1...@gmail.comwrote:

 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.


Maybe you could bottom post? Thanks,

http://www.freebsd.org/doc/handbook/mac-troubleshoot.html

-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Aaron Lewis

Oh , thanks Adam , i shouldn't be so lazy , I'll check that page.

Adam Vande More wrote:
On Mon, Mar 22, 2010 at 6:47 PM, Aaron Lewis 
aaron.lewis1...@gmail.com mailto:aaron.lewis1...@gmail.com wrote:


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.


Maybe you could bottom post? Thanks,

http://www.freebsd.org/doc/handbook/mac-troubleshoot.html

--
Adam Vande More



--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org