LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-02-2014, 08:03 AM   #1
bluesdoctor
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, 08:59 AM   #2
bluesdoctor
LQ Newbie
 
Registered: Apr 2014
Posts: 2

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

echo -e helps!!!!
 
  


Reply


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 10:34 PM
changing root password sunlinux Linux - Security 2 03-21-2006 06:24 AM
changing root password minm Linux - Newbie 9 08-31-2004 03:03 AM
Changing root password Gibby Mandriva 1 10-02-2003 10:38 PM
changing root password jamaso Linux - Newbie 1 12-25-2001 10:38 PM


All times are GMT -5. The time now is 10:33 PM.

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