Why i have to enter my password twice on log in ?


9 posts
by Corpsman » Thu Jun 28, 2012 11:25 am
Hello all,

I use :
Linux raspberrypi 3.1.9+ #90 Wed Apr 18 18:23:05 BST 2012 armv6l


Every time, when i reboot the Pi ( by turning it off and on again, or via "sudo reboot" ) and i log in the first time. I have to enter my password twice. If i log "out" and "in" while the Pi is running i only need to enter the password once.

I think the second password entering is the sudo password, but why is this, and the better question, how can i turn the second password dialog off ?

Here is a login screendump if i login via ssh :

Using username "corpsman".
corpsman@192.168.49.58's password:
Linux raspberrypi 3.1.9+ #90 Wed Apr 18 18:23:05 BST 2012 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jun 27 18:38:52 2012 from 192.168.49.46
[sudo] password for corpsman:
Date and Time are unknown - using 2012-06-27 18:49 as an approximation
Correct the date and time using e.g: sudo date --set="2012-06-27 18:49"
corpsman@raspberrypi:~$
Posts: 4
Joined: Thu Jun 28, 2012 10:59 am
by nadir » Thu Jun 28, 2012 1:35 pm
I just ran into the same problem.
I think this is the problem:
Date and Time are unknown - using 2012-06-27 18:49 as an approximation
Correct the date and time using e.g: sudo date --set="2012-06-27 18:49"

and the second passwd uses sudo to set the date.
I installed ntp, and that solved the problem.
I didn't had it in the beginning, then i tried to set dns-nameservers by several ways, and assumed that has caused the problem (now, as you have the same problem, it looks like that was not the source of the problem).

https://wiki.debian.org/NTP
Posts: 112
Joined: Sun Jun 10, 2012 5:45 am
by RaTTuS » Thu Jun 28, 2012 1:37 pm
It's the
/etc/profile.d/set_recent_time.sh
script
if you sudo mv it elsewhere then it will not run ...
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX - Prosliver FTW
"That's not right, the badgers have moved the goalposts."
User avatar
Posts: 5161
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
by jojopi » Thu Jun 28, 2012 1:56 pm
RaTTuS wrote:if you sudo mv it elsewhere then it will not run ...
But then the date will be left in 1970, which will cause other problems.

So better solutions are to fix ntp, allow sudo with no password as the script expects ("sudo usermod -aG users corpsman"), put up with the extra password on the first login, or switch to a less buggy distro where date setting is no longer a hack: http://www.raspberrypi.org/archives/1435
User avatar
Posts: 2057
Joined: Tue Oct 11, 2011 8:38 pm
by nadir » Thu Jun 28, 2012 2:34 pm
RaTTuS: i can say for sure i didn't mv said file.

jojopi:
I wouldn't call "allowing sudo with no passwd" a proper solution.
I wouldn't call Debian stable buggy. Rather the opposite
There is more than one reason people might want to use stable instead of testing (just like there is more than one reason people might want to run testing instead of stable). If one uses testing one should know what one will run into. To solve a problem related to time setting: is not a good reason.People who don't understand where such problems might come from probably should not run testing (atm), because there they will have to do more troubleshooting of that kind.
"apt-get install ntp" is not a hack, and i am quite sure that i have to do it on most of my machines, be they stable, testing or sid.
testing is not a different distro, but a different branch of the same distro.
All of that: imho.
Posts: 112
Joined: Sun Jun 10, 2012 5:45 am
by Corpsman » Thu Jun 28, 2012 2:54 pm
Well thanks for your ideas.

meanwhile i tried to get Lazarus working (Attenteion German Link) and found out that this wont work with the stable. So i decided to download the "instable" and hope there where not that much problems..

To Know where the error came from is always a good solution and gives me more options. Maybe i get lazarus working on the stable debian. Than installing ntp is in my mind.

Thanks to all for reply.
Posts: 4
Joined: Thu Jun 28, 2012 10:59 am
by jojopi » Thu Jun 28, 2012 3:40 pm
nadir wrote:I wouldn't call "allowing sudo with no passwd" a proper solution.
sudo with no password is the standard that the foundation have elected for their debian-based images. The issue in this thread can only occur if you change from that. So changing back to it is definitely a fix that deserves mention.
nadir wrote:I wouldn't call Debian stable buggy. Rather the opposite
You are right. I did not mean to suggest that debian squeeze is buggier than debian wheezy. But we are talking about people using the foundation's prepared images, not debootstrap. All the foundation's squeeze-based images were buggy with numerous issues like this one. The foundation's wheezy-based image uses fake-hwclock and is immune to this. Even though it is based on debian testing, it is much better for beginners.
nadir wrote:"apt-get install ntp" is not a hack, and i am quite sure that i have to do it on most of my machines, be they stable, testing or sid.
No, set_recent_time.sh was what I was calling a hack. "apt-get install ntp" is just unnecessary and will not help, since it is preinstalled in the image already. That is why, of my four proposed solutions, "fix ntp" is the least easy to implement. First you need to find out why it is not already working for you...
User avatar
Posts: 2057
Joined: Tue Oct 11, 2011 8:38 pm
by nadir » Thu Jun 28, 2012 5:39 pm
jojopi: thanks for making it more clear to me. I hesitated to post, as i know there are differences between my experience and running Debian on a PC or laptop. I did not know how to express that, and hence added a simple "imho" at the end. Thanks again
Posts: 112
Joined: Sun Jun 10, 2012 5:45 am
by Corpsman » Fri Jun 29, 2012 5:32 pm
So,
i successfully installed the unstable version of debian and after some research on how to use aptitude i am realy happy with the things going on.

Only different to the stable version for me, is the randomly crashing Pi, but i use it most time with 100% CPU Load and in my room is about 30°Celsius. Maybe i should think about some cooling methods for the Pi...
Posts: 4
Joined: Thu Jun 28, 2012 10:59 am