All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] sshd and password problem
@ 2011-03-24 19:19 Heyendal, Carl
  2011-03-24 19:31 ` Thomas Petazzoni
  2011-03-24 19:33 ` ANDY KENNEDY
  0 siblings, 2 replies; 3+ messages in thread
From: Heyendal, Carl @ 2011-03-24 19:19 UTC (permalink / raw)
  To: buildroot

I added OpenSSH to my top level menuconfig in Buildroot. When I brought
the platform up I tried to 'ssh' to the target. But each time I tried to
login to the target, ssh would always force me to change my password, and then 
close the connection. 

heyendal at ubuntu1-carlh:~$ ssh carlh at 192.168.52.190
carlh at 192.168.52.190's password: 
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for carlh
Old password: 
New password: 
Retype password: 
Password for carlh changed by carlh
Connection to 192.168.52.190 closed.
heyendal at ubuntu1-carlh:~$ ssh carlh at 192.168.52.190
carlh at 192.168.52.190's password: 
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for carlh
Old password: 
New password: 
Retype password: 
Password for carlh changed by carlh
Connection to 192.168.52.190 closed.

Despite my problem with ssh I could always login through a console without any 
problems.

So I investigated the format of the shadow file and noticed that the 'days since
last password changed' was set to '0' for my account and for root. However all 
the other entries in the shadow file had a substantial value for that field, 
and all being the same value (10933). 

root:[deleted field]:0:0:99999:7:::
bin:*:10933:0:99999:7:::
daemon:*:10933:0:99999:7:::
adm:*:10933:0:99999:7:::
lp:*:10933:0:99999:7:::
sync:*:10933:0:99999:7:::
shutdown:*:10933:0:99999:7:::
halt:*:10933:0:99999:7:::
uucp:*:10933:0:99999:7:::
operator:*:10933:0:99999:7:::
nobody:*:10933:0:99999:7:::
default::10933:0:99999:7:::
carlh:[deleted field]:0:0:99999:7:::


So I changed the same field for my account and for root from 0 to 10933 
and voila, it fixed the problem with ssh.

Is this a bug with ssh looking at an incorrect field? Is there some other 
build setting I should have done to prevent the problem?

thanx
/carl

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] sshd and password problem
  2011-03-24 19:19 [Buildroot] sshd and password problem Heyendal, Carl
@ 2011-03-24 19:31 ` Thomas Petazzoni
  2011-03-24 19:33 ` ANDY KENNEDY
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2011-03-24 19:31 UTC (permalink / raw)
  To: buildroot

On Thu, 24 Mar 2011 15:19:53 -0400
"Heyendal, Carl" <CHeyendal@stanleyworks.com> wrote:

> root:[deleted field]:0:0:99999:7:::

In our skeleton, this line is:

root::10933:0:99999:7:::

so it looks like you have changed this field.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] sshd and password problem
  2011-03-24 19:19 [Buildroot] sshd and password problem Heyendal, Carl
  2011-03-24 19:31 ` Thomas Petazzoni
@ 2011-03-24 19:33 ` ANDY KENNEDY
  1 sibling, 0 replies; 3+ messages in thread
From: ANDY KENNEDY @ 2011-03-24 19:33 UTC (permalink / raw)
  To: buildroot

> I added OpenSSH to my top level menuconfig in Buildroot. When I
> brought
> the platform up I tried to 'ssh' to the target. But each time I
> tried to
> login to the target, ssh would always force me to change my
> password, and then
> close the connection.

You don't have a RTC, do you ;). So, what you'll need to do is
to set the system time at boot to something close to now.  If
you have no way to externally source time, make the system time
something along the lines of +10seconds beyond whichever is 
later: passwd or shadow or some other file that you know you
have touched lately.  Doing this will make ssh think that
you have changed your password recently enough (like within the
last -- I think -- 300 Billion years).

Andy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-24 19:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24 19:19 [Buildroot] sshd and password problem Heyendal, Carl
2011-03-24 19:31 ` Thomas Petazzoni
2011-03-24 19:33 ` ANDY KENNEDY

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.