Set pre-encrypted passwords for users

Joel Merrick joel.merrick at gmail.com
Wed Mar 31 14:08:19 CEST 2010


On Wed, Mar 31, 2010 at 12:21 PM, Cristian Ionescu-Idbohrn
<cristian.ionescu-idbohrn at axis.com> wrote:
> On Wed, 31 Mar 2010, Joel Merrick wrote:
>
>> Use useradd or usermod
>>
>> ie..
>>
>> useradd -o -s /bin/bash -p $ENCPASS user
>
> But that will make $ENCPASS visible with:
>
>        $ tr '\0' ' ' < /proc/PID/cmdline
>
> for a moment.  Isn't reading from a file descriptor is the prefered
> method for doing that?
>

Never thought of that.. my installs are CD based, with no network
attached (mainly), so not really a massive issue - even on the
network.. It'd be trivial to read an fd instead I suppose, was just
sticking to the way FAI seemed to do it, with $ROOTPW

Works for me anyway :)


>
> Cheers,
>
> --
> Cristian
>



-- 
$ echo "kpfmAdpoofdufevq/dp/vl" | perl -pe 's/(.)/chr(ord($1)-1)/ge'



More information about the linux-fai mailing list