Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


  Search this Thread
Old 04-02-2014, 09:03 AM   #1
LQ Newbie
Registered: Apr 2014
Posts: 2

Rep: Reputation: Disabled
Script for root password changing

Hello everybody!!!

I need a script for changing root password. After some investigation I found follow command:

echo "pass\npass" | passwd root

I checked it on Ubuntu, and it works, but....
My target is embedded linux, and when I execute this command on device, it does not work. The message is:

Changing password for root
New password:
Retype password:
Passwords don't match
passwd: password for root is unchanged

I suppose, that all string with passwords is read as a password for first request (New password, and for the second request (Retype password, nothing remains.

Does someone have any idea, how to fix it?
Old 04-02-2014, 09:59 AM   #2
LQ Newbie
Registered: Apr 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
I got it!!!

echo -e helps!!!!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to login using root after changing root password using passwd command rodimail SUSE / openSUSE 3 12-27-2011 11:34 PM
changing root password sunlinux Linux - Security 2 03-21-2006 07:24 AM
changing root password minm Linux - Newbie 9 08-31-2004 04:03 AM
Changing root password Gibby Mandriva 1 10-02-2003 11:38 PM
changing root password jamaso Linux - Newbie 1 12-25-2001 11:38 PM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 04:56 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration