[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug? - Unable to set groups to live user as per manual



Hi

I have tried both methods, described in the manual (see below), to set the groups for the live user without success.

The reason I found this issue is because I couldn't shutdown, then I checked the groups for the live user.

There are no error messages, the build ends successfully.

Live-build version is  3.0.5-1 running on wheezy.

I would like to know if I'm doing something wrong, if anything?

Any insight would be grateful.

Cheers
Ozi

#!/bin/sh

set -e

_DISTRIBUTION="wheezy"
_ARCHITECTURES="amd64"
_LINUX_FLAVOURS="amd64"
_ARCHIVE_AREAS="main contrib non-free"
_SOURCE="false"
_MIRROR_BINARY="http://ftp.us.debian.org/debian/"


lb config noauto \
--mode debian \
--distribution "${_DISTRIBUTION}" \
--debian-installer live \
--architectures "${_ARCHITECTURES}" \
--linux-flavours "${_LINUX_FLAVOURS}" \
--apt-recommends false \
--apt-options "--yes --no-install-recommends" \
--apt-secure true \
--apt-indices false \
--apt-source-archives false \
--archive-areas "${_ARCHIVE_AREAS}" \
--parent-mirror-bootstrap "${_MIRROR_BINARY}" \
--mirror-bootstrap "${_MIRROR_BINARY}" \
--parent-mirror-binary "${_MIRROR_BINARY}" \
--mirror-binary "${_MIRROR_BINARY}" \
--backports true \
--security false \
--updates false \
--memtest none \
--win32-loader false \
--debug \
--verbose \
--bootappend-live "boot=live \
config \
quiet\
splash \
components \
nottyautologin \
noeject \
swapon \
hostname=star \
live-config.user-default-groups=audio,cdrom,dip,floppy,video,plugdev,netdev,powerdev,scanner,bluetooth,fuse" \
"${@}"

config/includes.chroot/etc/live/config/user-setup.conf
LIVE_USER_DEFAULT_GROUPS="sudo audio cdrom dip floppy video plugdev netdev powerdev scanner bluetooth fuse"


http://live.debian.net/manual/stable/html/live-manual/customizing-run-time-behaviours

10. Customizing run time behaviours

All configuration that is done during run time is done by live-config. Here are some of the most common options of live-config that users are interested in. A full list of all possibilities can be found in the man page of live-config.

10.1 Customizing the live user

One important consideration is that the live user is created by live-boot at boot time, not by live-build at build time. This not only influences where materials relating to the live user are introduced in your build, as discussed in Live/chroot local includes, but also any groups and permissions associated with the live user.

You can specify additional groups that the live user will belong to by using any of the possibilities to configure live-config. For example, to add the live user to the fuse group, you can either add the following file in config/includes.chroot/etc/live/config/user-setup.conf:

LIVE_USER_DEFAULT_GROUPS="audio cdrom dip floppy video plugdev netdev powerdev scanner bluetooth fuse"

or use live-config.user-default-groups=audio,cdrom,dip,floppy,video,plugdev,netdev,powerdev,scanner,bluetooth,fuse as a boot parameter.

It is also possible to change the default username "user" and the default password "live". If you want to do that for any reason, you can easily achieve it as follows:

To change the default username you can simply specify it in your config:

$ lb config --bootappend-live "boot=live config username=live-user"

One possible way of changing the default password is by means of a hook as described in Boot-time hooks. In order to do that you can use the "passwd" hook from /usr/share/doc/live-config/examples/hooks, prefix it accordingly (e.g. 2000-passwd) and add it to config/includes.chroot/lib/live/config/


Reply to: