[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Automatic password changing



>     First time on this list :) Anyway, I have a little brain cracker
> here, or at least for me it is. Does anybody happen to know how to have
> an automatic process which sets "roots" password every 1 hour ? What I
> mean basically is so that when the root password gets changed
> accidentally, this process sets it back to what it was. I figured out
> that the only way is to make a process or a file to execute in the
> cron.daily . But then again, I don´t know how to do that either . . .
> Thanks for the help
> 
well - why give you root-access to him?
it easy to hack your own system: just press <shift> when lilo starts and
type "linux init=/bin/bash rw" or somethig like this. or if you have a
dos-system on another partition, then you can do 
"loadlin zimage init=/bin/bash rw". all of them give you a password-free
root-shell (anyway - it has it's quirks ...).
if you insist on the auto-password-reset, then try this: 

awk -F: '{if($1=="root") print $1 ":saved-string-from-shadow:" $3
":" $4 ":" $5 ":" $6 ":" $7 ":" $8 ":" $9; else print}' 
</etc/shadow >/etc/shadow.new && mv /etc/shadow.new /etc/shadow

(all on one line)
saved-string-from-shadow must be replaced with the strange kToB98CvTYOH6
(of course it's different for you) which is currently in your shadow.
note, that anyone with root-access can render this system to do exactly
the opposite of the thing you want ...

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Linux - the last service pack you'll ever need.



Reply to: