Dear all,
Hi I have this strange problem.
I use Raspbian strech lite 2017-09-07. I make a micro-sd card with Rufus from Windows 10.
I boot and change the password, from raspberry to somename#05
This work. No problem, can reboot and login again with the new password. Now I go into raspi-config and set ssh to work.
Reboot and my password is changed or at least the acces for user pi is gone! Acces denied.
As long as I don't enable ssh there is no problem, as soon as I activate ssh in raspi-config I can't login again. Not with ssh from the windows machine and not directly on the board.
I have 10 boards to configure for a school project, this is the second board I do. The first didn't had this problem. Did exacly the same.
Who has an idea?
Pit.
- FTrevorGowen
- Forum Moderator
- Posts: 7078
- Joined: Mon Mar 04, 2013 6:12 pm
- Location: Bristol, U.K.
Re: Strange problem (bug?) setting password
How did you change the password? (ie. can/did you use the raspi-config utility).
What happens if you enable SSH before changing the password?
What happens if you use Raspbian full, rather than lite?
What is Rufus?
Trev.
What happens if you enable SSH before changing the password?
What happens if you use Raspbian full, rather than lite?
What is Rufus?
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B, B+, and a A+) but Buster on the P3B+, P4B's & P400. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm
Re: Strange problem (bug?) setting password
Trevor, I did try to set ssh thru raspi-config first, then a reboot and ssh gave me a warning about the password of the user pi. Then changed the password. I can now login direct on the board. But I still cannot login thru ssh from my windows machine.
Rufus is a tool to write iso or img files to removable disks. https://rufus.akeo.ie/
I did change the password on the command line and thru raspi-config, it make no difference.
Now that it work, i did it on the commandline, as ssh asked.
But I still can't ssh to the board.
Thx, Pit
Rufus is a tool to write iso or img files to removable disks. https://rufus.akeo.ie/
I did change the password on the command line and thru raspi-config, it make no difference.
Now that it work, i did it on the commandline, as ssh asked.
But I still can't ssh to the board.
Thx, Pit
Re: Strange problem (bug?) setting password
It happend again. I think this time it is because i set the keyboard to my format. I think I will do all the setting up prior to the changing of the password.
Later more.........
Pit
Later more.........
Pit
Re: Strange problem (bug?) setting password
Oke, after i did all the things i wanted to do whit raspi-config, apt update/upgrade, i changed the password. After a reboot I could normally log in.
It looked oke. But then I tried my first ssh login local. As in ssh localhost. It first responded normal but then I had to give my password.
And you gues right, no go! I broke the action down with a ctrl-c and did a new passwd pi, set the same password and he didn't react to it but password rest. Normally if you reset your password to the old one it will react that it didn't set the password or something.
Now I tried to ssh to localhost and everything worked perfect. So, there is a bug! Can't be any difference.
ssh reset passwords under certain situations!
For me now it means I do all the changes, updates, etc, on board, do my first ssh onboard local and then make it headless by unplugging keyboard and screen.
Pit
It looked oke. But then I tried my first ssh login local. As in ssh localhost. It first responded normal but then I had to give my password.
And you gues right, no go! I broke the action down with a ctrl-c and did a new passwd pi, set the same password and he didn't react to it but password rest. Normally if you reset your password to the old one it will react that it didn't set the password or something.
Now I tried to ssh to localhost and everything worked perfect. So, there is a bug! Can't be any difference.
ssh reset passwords under certain situations!
For me now it means I do all the changes, updates, etc, on board, do my first ssh onboard local and then make it headless by unplugging keyboard and screen.
Pit
Re: Strange problem (bug?) setting password
Logon failures to local system and logon failures via ssh are 2 different problems.
Which are you having problems with? Not clear to me from what you wrote?
Are you changing the keyboard country setting? Note that changing the setting on the local RPi system does not affect the remote keyboard via ssh.
Avoid using the # or @ character in your password as those will be different characters depending on what country setting.... GB vs US for example.
Type your password at a cl prompt to see if it is what you think.
Which are you having problems with? Not clear to me from what you wrote?
Are you changing the keyboard country setting? Note that changing the setting on the local RPi system does not affect the remote keyboard via ssh.
Avoid using the # or @ character in your password as those will be different characters depending on what country setting.... GB vs US for example.
Type your password at a cl prompt to see if it is what you think.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.
Re: Strange problem (bug?) setting password
If that is true, you may have uncovered a potentially major security breach for Linux systems worldwide.ssh reset passwords under certain situations!
But I think you are misunderstanding what you are seeing...
- FTrevorGowen
- Forum Moderator
- Posts: 7078
- Joined: Mon Mar 04, 2013 6:12 pm
- Location: Bristol, U.K.
Re: Strange problem (bug?) setting password
Ok. I've now had the time to write and boot up a Raspbian Lite system (I normally use the full version). I downloaded the current image, wrote it to a pristine 16Gb uSDHC card in an external USB-based card writer via Etcher on my Gigabyte Brix m/c. Transferred it to one of my pi zero's and let it boot up, resize the file system and then re-boot. Changed the default password, hostname, and enabled ssh via raspi-config and (only) then rebooted. Checked via ifconfig the IP address assigned to the wired ethernet (connected via a Freegene USB combined LAN & hub adapter). SSH server is up and running O.K. - as shown by this login via a PuTTY shell running on the Brix:
(The xauth message is to be expected since there's no X-server running on the Lite system)
Trev.
Code: Select all
login as: pi
pi@192.168.23.57's password:
Linux raspizero16GbLite 4.9.41+ #1023 Tue Aug 8 15:47:12 BST 2017 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: Sat Oct 14 18:17:24 2017
/usr/bin/xauth: file /home/pi/.Xauthority does not exist
pi@raspizero16GbLite:~ $
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B, B+, and a A+) but Buster on the P3B+, P4B's & P400. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm
Re: Strange problem (bug?) setting password
And again, the fourth one i configure. Now totally on the end of my process. This one holds apache.
Set everything i needed. Connected over ssh, no problem, with new password. Then changed the ipadres from dhcp to static.
Gone password after reboot.
Pit
Mark my words: a bug.
Set everything i needed. Connected over ssh, no problem, with new password. Then changed the ipadres from dhcp to static.
Gone password after reboot.
Pit
Mark my words: a bug.
- mahjongg
- Forum Moderator
- Posts: 14785
- Joined: Sun Mar 11, 2012 12:19 am
- Location: South Holland, The Netherlands
Re: Strange problem (bug?) setting password
Try this, when the system ask for the user name, type in your password, does the password appear as expected?
- HawaiianPi
- Posts: 7599
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
Re: Strange problem (bug?) setting password
Here is how I set up a Raspberry Pi for headless boot and SSH login. It works for devices with built-in WiFi like the Pi3 and Pi Zero W, and for non-wireless Pi models with a Raspbian compatible USB WiFi dongle (like my Pi0). It's all done prior to the first boot when making the SD card.
If you are going to be changing passwords from the Pi itself, make sure you get your localisation and keyboard settings configure first, or you may be entering something other than what you think (I strongly suspect this is your problem).
- Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
- Grab the Etcher software from https://etcher.io/
- Install Etcher and use it to write the Raspbian image to your SD card. You don't need to extract the image or format the card prior to writing. Just choose the Raspbian Zip, pick your SD card and write (if you have trouble, verify the SHA256 checksum of the download).
- Remove and reinsert the SD card so that your Windows or Mac PC can see the small FAT32 partition on the SD card.
- On that small partition create a file with the name ssh or ssh.txt (it can be empty, the contents don't matter).
- If you are going to connect to a WiFi network, create another file called wpa_supplicant.conf which has the following inside.
Code: Select all
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=US network={ ssid="Your network SSID" psk="Your WPA/WPA2 security key" key_mgmt=WPA-PSK }
- Edit country=, ssid= and psk= with your information and save the file.
- Safely eject the card from your PC and use it to boot the Pi.
If you are going to be changing passwords from the Pi itself, make sure you get your localisation and keyboard settings configure first, or you may be entering something other than what you think (I strongly suspect this is your problem).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?
Re: Strange problem (bug?) setting password
how are you changing the dhcp to static,
are you sure you have the correct IPaddress
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
Re: Strange problem (bug?) setting password
I am building a project.
10 raspberry's wil become a replica of the internet. So I have to configure 10 raspberry's.
The first, no problems. the second, direct at the start. The thirt, no problems. Now the fourth, fully configured, problems at the point I set the dhcp to static.
I only write a piece of code in de dhcpcd.conf file. That's it. Pasword not the same anymore.
Keyboard was changed, software installed, ssh working, updates done, complete finisched, only from dhcp to static.
And yes, as a IT teacher for Linux, whit 20 years experience (i write bad english) I know what i do to chance from dhcp to static....
Pit
10 raspberry's wil become a replica of the internet. So I have to configure 10 raspberry's.
The first, no problems. the second, direct at the start. The thirt, no problems. Now the fourth, fully configured, problems at the point I set the dhcp to static.
I only write a piece of code in de dhcpcd.conf file. That's it. Pasword not the same anymore.
Keyboard was changed, software installed, ssh working, updates done, complete finisched, only from dhcp to static.
And yes, as a IT teacher for Linux, whit 20 years experience (i write bad english) I know what i do to chance from dhcp to static....
Pit