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: (6) </ 1 2 3 [4] 5 6 >/

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

reply to topic new topic new poll
Topic: cups-1.3.5, /var and epsgs< Next Oldest | Next Newest >
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: April 02 2008,19:21 QUOTE

There's one thing though - if I remember right, DSL has a root password set, it's just not disclosed what it is..

--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
lucky13 Offline





Group: Members
Posts: 1478
Joined: Feb. 2007
Posted: April 02 2008,19:26 QUOTE

Quote
If the root password had not been set, then the script would have to open a terminal window for the user to be able to enter a password, no?

Or at least throw up some kind of error message that there's not a root password set. If curaga is right (I didn't know there's already a root password but hopefully it's randomized one-time-use like Finnix does so someone who figures it out can't pwn every "dsl@box" he sees) you probably want to have the user set one himself regardless. Even if a user uses "secure" cheatcode or has otherwise set one, all he has to do is remember what he used and re-enter it or enter a new one.


--------------
"It felt kind of like having a pitbull terrier on my rear end."
-- meo (copyright(c)2008, all rights reserved)
Back to top
Profile PM WEB 
Jason W Offline





Group: Members
Posts: 260
Joined: Nov. 2006
Posted: April 03 2008,00:15 QUOTE

Yes, DSL does apparently have a root passwd set as well as for user dsl. And passwd -S does not work with busybox. Another simple trick may be to include :

#!/bin/bash

if sudo cat /etc/shadow | grep root:$1$$; then
xterm -title "Set Root Passwork" -e sudo passwd
fi

This throws up an xterm window prompting for a root password if it has not already been set by the user, and exits when it has been entered. It looks to me like any time a root password is set, it only has one $ after the 1.
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: April 03 2008,07:36 QUOTE

You're right in that "root:$1$$" changes to "root:$1$" in /etc/shadow after the root password is set, but - for me at least - grep does not seem to pick this up:
Code Sample
$ sudo cat /etc/shadow | grep root:    
root:$1$$I.X7vmLDEcVMmpJ9bU4Ar1:11456:0:99999:7:::
$ sudo cat /etc/shadow | grep root:$1$$
[nothing]
$ sudo grep 'root:' /etc/shadow
root:$1$$I.X7vmLDEcVMmpJ9bU4Ar1:11456:0:99999:7:::
$ sudo grep 'root:$' /etc/shadow
[nothing]

- seems grep doesn't like the "$"?
Back to top
Profile PM 
lucky13 Offline





Group: Members
Posts: 1478
Joined: Feb. 2007
Posted: April 03 2008,11:31 QUOTE

That's because $ has to be escaped in shell scripting because it's designated for variables. It can't have a trailing character or that part will be read as a variable. Try putting each $ you want read as $ in [], like [$].

--------------
"It felt kind of like having a pitbull terrier on my rear end."
-- meo (copyright(c)2008, all rights reserved)
Back to top
Profile PM WEB 
29 replies since Feb. 10 2008,10:11 < Next Oldest | Next Newest >

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

Pages: (6) </ 1 2 3 [4] 5 6 >/
reply to topic new topic new poll
Quick Reply: cups-1.3.5

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