Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ [1] 2 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: setting root passwd for headless system< Next Oldest | Next Newest >
ErroneousBee Offline





Group: Members
Posts: 2
Joined: June 2006
Posted: June 01 2006,18:37 QUOTE

Hello,

Ive remastered a DSL CD to boot to "dsl 2 ssh ftp" for a headless system, so that I can get in and repair stuff if an install or grub or something goes squiffy.

But I cannot find a way to automatically set the root or dsl passwd on startup.

Ive tried variations of "passwd <<EOF" and "echo 's3cr3t' | passwd" in the startup script, but nothing works, so Im still plugging in a keyboard and typing blind.

Anybody know how to make DSL accessible via ssh from CD boot with no user interaction at the keyboard?
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: June 01 2006,22:36 QUOTE

I haven't tried it, but if I had to I'd do something like this....

echo 's3cr3t' | passwd --stdin username


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
pr0f3550r Offline





Group: Members
Posts: 378
Joined: Dec. 2005
Posted: June 02 2006,10:35 QUOTE

How do you access the headless system? Serial console or ethernet?
The former option you need to hack the 'getty' daemon on the DSL box.

There is an excellent tutorial on "BSD Hacks", O'Reilly, which I'd like to port to DSL if I had time.
Back to top
Profile PM 
ErroneousBee Offline





Group: Members
Posts: 2
Joined: June 2006
Posted: June 05 2006,15:01 QUOTE

Quote (mikshaw @ June 01 2006,18:36)
I haven't tried it, but if I had to I'd do something like this....

echo 's3cr3t' | passwd --stdin username

There is no --stdin option on the DSl passwd command  :(

Its a lounge PC thats going to be running though my TV when I get things running, but currently I am carrying a monitor downstrair to try and do an install of gentoo.

I just want a rescue disk at the ready in case things go wrong and I need to repair a partition or something. Then I can slip the DSL CD in, and run upstairs to ssh into the box, chroot to wherever and start fixing stuff. At the moment I have to hang around, guess when DSL has booted, and type "passwd" "s3cr3t" "s3cr3t" before running upstairs.

I'm now thinking a passwd -d root could work.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: June 05 2006,19:38 QUOTE

Another option is to set up your password and then backup /etc/shadow.  Make a mydsl cd remaster with your backup in the root of the CD, and it should automatically overwrite the original so you won't need to set the password each time you boot the cd.

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
11 replies since June 01 2006,18:37 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ [1] 2 3 >/
reply to topic new topic new poll
Quick Reply: setting root passwd for headless system

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code