Full replacement of knoppix username,uid,groupname,gid.
Hello,
I've been hacking knoppix a bit, hoping to eventually add boot line options that will allow you to define the username, uid, groupname, gid at bootup and then have knoppix cleanly load an environment for that user (rather than the koppix username/uid). I haven't got to the boot option reading yet, but have found most of the relevant places (knoppix-autoconfig, etc) where such information must be changed.
The one thing I haven't found is exactly where and how the /home/knoppix directory is mounted at boot, and how to modify this to generically mount /home/foo instead.
Pointers would be appreciated - if there is interest I would be happy to fold this back to Klaus or this forum if I can do this cleanly.
Nathan
Re: Full replacement of knoppix username,uid,groupname,gid.
Quote:
Originally Posted by nosknoppix
Hello,
I've been hacking knoppix a bit, hoping to eventually add boot line options that will allow you to define the username, uid, groupname, gid at bootup and then have knoppix cleanly load an environment for that user (rather than the koppix username/uid). I haven't got to the boot option reading yet, but have found most of the relevant places (knoppix-autoconfig, etc) where such information must be changed.
The one thing I haven't found is exactly where and how the /home/knoppix directory is mounted at boot, and how to modify this to generically mount /home/foo instead.
Pointers would be appreciated - if there is interest I would be happy to fold this back to Klaus or this forum if I can do this cleanly.
Nathan
Hi,
I've done it successfully.
You need to look at a number of files. Let us start one by one: -
First file to look at is "miniroot.gz". You will have to modify the file "linuxrc" in its root directory.
(After uncompressing and mounting it. If you don't know, then read on - mount boot.img file to some directory e.g. "mount -t msdos -o loop boot.img /mnt/test". Then "cd /mnt/test", "cp miniroot.gz <location>" preferable on harddisk. Then "umount /mnt/test". Unzip miniroot.gz - "gunzip miniroot.gz". Then mount it "mount -o loop miniroot /mnt/test" or whatever. Make necessary changes to it then "umount /mnt/test". Then "gzip miniroot". The mount the boot.img - "mount -t msdos -o loop boot.img /mnt/test". Then "cp miniroot.gz /mnt/test". When asked overwrite it. Then "umount /mnt/test" and you are done with changes.).
The "/etc/passwd", "/etc/shadow", "/etc/shadow", "/etc/mtab", "/etc/fstab" will be of interest to you.
If you are changing the name of compressed filesystem from "KNOPPIX" to something else then you'll have to fix the symlinks in directory w.r.t. to your compressed filesystem's name as well as "/etc/fstab" and "/etc/mtab" accordingly.
First try these then tell the progress. 8)