Как изменить живое имя пользователя ISO

Пользователь по умолчанию в Ubuntu является "человечностью" без пароля. Как я могу изменить имя? Я пытался редактировать casper.conf, но он ничего не изменяет. Я слышал, что кто-то сказал, что Вы должны перекомпилировать initrd.gz, но никогда не объясняли как.

Заранее спасибо за любого, кто знает, как сделать это.

1
задан 23 August 2016 в 02:36

1 ответ

Вся информация, в которой Вы нуждаетесь, находится в следующей ссылке (настраивающий имя пользователя входа в систему, и пароль о 1/3 пути вниз):

https://help.ubuntu.com/community/LiveCDCustomization

Этот сегмент говорит об этом:

Removing the (Casper) Autologin

The autologin feature of the Jaunty/9.04 live CD is a bit of an on-the-fly boot-hack. After extracting the initrd.gz, you need to edit the casper-bottom/25configure_init script and then recreate the initrd.gz file, replacing the original in extract-cd/casper. The process to do so goes like this:


# cd extract-cd/casper
# mkdir tempdir
# cd tempdir
# gunzip -dc ../initrd.gz | cpio -imvd --no-absolute-filenames
# cp scripts/casper-bottom/25configure_init scripts/casper-bottom/25configure_init.orig
# vi scripts/casper-bottom/25configure_init
Now look for line 25 which has the conditional statement to test $USERNAME.

Line 25 performs a conditional evaluation and if it evaluates to true, it will execute the code within the if block. The if block contains code to modify files used in the boot process to create the live cd autologin.

To disable the autologin feature, Remove $USERNAME, but just leave the quotes. The -n modifier tests the $USERNAME string to see if it's length is non-zero. By removing the variable, and leaving two double quotes, this statement evaluates to false because the two double quotes effectively make a zero-byte string. Be sure to leave no whitespace between the quotes because whitespace will make the evaluation true and execution wil fall into the if block.

21:log_begin_msg "$DESCRIPTION"
22:
23:# Arrange for shells on virtual consoles, rather than login prompts
24:
25:if [ -n "$USERNAME" ]; then
After making the change, line 25 will look like this:

25:if [ -n "" ]; then
Save the file and quit the editor. Then, from extract-cd/casper/tempdir run the following command to re-create the initrd.gz file. There are other methods for re-creating the initrd.gz file on this page which may work also.:


# cp ../initrd.gz ../initrd.gz.orig
# find . | cpio -o -H newc | gzip -9 > ../initrd.gz
This will create a new initrd.gz file with no auto login. You can then continue to remaster the CD as described on this page. Be sure to create a user and password to login with before you remaster the cd. If you do not, you will not be able to login after booting!
0
ответ дан 8 December 2019 в 09:11

Другие вопросы по тегам:

Похожие вопросы: