change user FAI

mamadou diop diopmodou8 at gmail.com
Mon Sep 13 15:32:48 CEST 2010


Thank you Stephan for your help. I have used fai-class to add the class to
my host but i don't understand
it very well in spite of reading the man page.

2010/9/13 Stephan Hermann <sh at sourcecode.de>

> Hi mamadou,
>
>
> On Monday, September 13, 2010 01:52:03 pm mamadou diop wrote:
> > Thak you? How to install a package in the nfsroot? Must i do 'apt-get
> > install makepasswd'?
>
> ok you ssh to your fai box,
> then chroot <your FAI-NFSROOT>
> apt-get install makepasswd
> exit
>
> now you enter your FAI config space and switch to the SCRIPTS directory
>
> mkdir ACCOUNTS  <- this is your class name for those hosts where you want
> to
> install the accounts.
>
> cd ACCOUNTS
> vi 10-add-acounts
>
> and add the contents to the script
>
> after that, save it, and chmod 755 10-add-accounts
>
> Now you add the ACCOUNTS class to your host, redeploy et voila...
>
> Regards,
>
> \sh
> >
> >
> > 2010/9/13 Stephan Hermann <sh at sourcecode.de>
> >
> > > On Mon, Sep 13, 2010 at 10:06:21AM +0000, mamadou diop wrote:
> > > > Hello, instead of login 'fai' and password 'fai', i want after my
> > > > installation the user of the new system installed is
> > > > 'student' and his password 'student'. What to do?
> > >
> > > you need to write your own script for adding users to your to be
> deployed
> > > system.
> > >
> > > Something like this will help you with this:
> > >
> > > in your NFSROOT install "makepasswd" package
> > >
> > > ------------
> > >
> > > #!/bin/bash
> > > user="student"
> > > echo "student" > $target/root/clearpassword.txt
> > >
> > > makepasswd --clearfromfile --crypt-md5 | while read pw password ; do
> > >
> > >        $ROOTCMD useradd -d /home/${user} -s /bin/bash -G groupname -m
> -p
> > >
> > > ${password} -U ${user}
> > > done
> > >
> > >
> > > -----------------
> > >
> > >
> > >
> > >
> > > now you have your student account with password "student" inside your
> to
> > > be deployed system.
> > >
> > > This is untested, but should work out of the box
> > >
> > > Regards,
> > >
> > > \sh
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.10 (GNU/Linux)
> > >
> > > iEYEARECAAYFAkyOC8wACgkQwYnnM8CY76jRZQCghjf/NAaWeEpHi/rAuJ/4l372
> > > hsYAnirL1tvX2BqI8FLa6jLbHOIX8gG3
> > > =LTf3
> > > -----END PGP SIGNATURE-----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20100913/4603c218/attachment.htm 


More information about the linux-fai mailing list