How To Change The (Root) Password of your vendor-os?

Currently in the trunk branch /etc/shadow isn't copied during the 'slx-setup clone' process. So how do we
add a (root) password to the exported system?

General informations

Because every client is totally reseted on every boot/shutdown, there's no way, that user will be able to change
there password directly on the client side with the usually default shadow authentification system.
We recommend the use of server based authentification (like ldap).
Mainly this documentation is for development purpose, where you don't have 'real' users.

The regular Admin Way

You could just produce your own passwd,shadow and pass them via the system client configuration to the client. That would mean to copy these files into ~/openslx/config/<system-name>/<default,client-mac>/rootfs/etc to have them transferred during stage3 into the later stage4 ...

Possibility 2: temporaery till new export

  • Install the latest OpenSLX version (we need /dev/urandom in step 2.1)
  • slxos-setup shell <vendor-os-name>
    • passwd $username
    • exit
  • cat /proc/mounts
  • umount the mounted /proc system in the vendor-os-name folder
  • slxos-export export <vendor-os-name> nfs

Or add the password by hand in both /etc/passwd of your vendor-os
which are in /srv/openslx/export/nfs/<vendor-os-name> and
/var/opt/openslx/stage1/<vendor-os-name>.

That's a kinda dangerous way. The next export will undo the change!

Possibility 3: permit

Stage 3 configuration:

  • copy the root line in /etc/shadow
  • add now this line into the following sed expr. and save it in postinit.local (the second root:$2a$1... is your copied line):

These changes will also work after every new clone/export command!

Posibility 4: just for external access

Add ssh key from your server to the clients:

  • copy the public key from your server into rootfs/root/.ssh/authorized_keys in the config directory of your os

This works only for external access. Currently we can't say if this works also after a clone or new export!