I am playing around with the ISO image of a few Ubuntu derivatives - which should be fairly similar to Ubuntu. The version is 14.04.1 64bit. The idea here is to create a custom live USB stick, based on the live session that you get when you first boot Ubuntu from a DVD-ROM or a USB stick.
Note that, I have tried a normal installation of Ubuntu in the USB stick, but this is not suitable for me, because the USB is slow as a storage media. As a result, any session in this system was sluggish and generally ineffective.
So for best results and quicker respond the session needs to be run from a RAM-drive and the path of least effort seems to be the live Ubuntu session that you get when booting Ubuntu LiveCD or LiveUSB. If you have any other suggestion please feel free to put it forward.
I have gone through a large number of guides. I have heard of Ubuntu customization kit
and of other (mostly very old) specific customizations. One thing that is certain among all guides is that the customization needs to be done in the casper
initial (ram?) system. So, I have extracted the ISO image of Xubuntu
, and I have unsquashed
the filesystem.squashfs
boot file. From what I have read the boot scripts are located in
squashfs-root/usr/share/initramfs-tools/scripts/casper-bottom/ #directory
squashfs-root/usr/share/initramfs-tools/scripts/casper #file
And what I want to achieve - at least initially - is to
- have my own user with my own user name.
- delete the live session user
- disable autologin
I have already tried to do this from the live session (using persistency) but lightdm autologin features are not persistent and the same is true for deleting the live session user.
so in the file casper
I see there are 4 awesomely relevant entries
USERNAME=casper
USERFULLNAME="Live session user"
HOST=live
BUILD_SYSTEM=Custom
and changed it to
USERNAME=nass
USERFULLNAME="not a live session"
HOST=portableos
BUILD_SYSTEM=Custom
It looks like not only I can have my own user from boot , but also there is no need to delete the casper user as I am already the main user replacing casper :)
Unfortunately, replacing these with custom values, re-making the squashfs file system and replacing the file in the ISO does not change the live session user. The live session user is once again called "Ubuntu".
Likewise, doing chmod -x
in file casper-bottom/15autologin
(or even deleting it altogether) did not alter the boot process and did not ask for a password during login.
So it appears this is once again NOT the right location to create a new user, delete the casper user or to disable the autologin boot process.
So I have to ask, WHERE should I do all these customizations?
EDIT:
commenting user-session=xubuntu
in squashfs-root/etc/lightdm/lightdm.conf.d/10-xubuntu.conf
I have successfully disabled the autologin.
Also I have updated the file squashfs-root/etc/casper.conf
USERNAME=nass
USERFULLNAME="not a live session"
HOST=portableos
BUILD_SYSTEM=Custom
but again I boot to user "Ubuntu" - this is the only available user.
Finally, squashfs-root/etc/passwd
does not contain any entry for user "Ubuntu" so I can not simply alter it there.
It goes without saying that I "mksquashfs" the file system and replace the relevant file before every attempt to boot it.
to improve security
why do you think doing this would improve security? It's trivial to read any files or modify the USB to remove passwords in your account.