Upgrade Tor Browser to 14.0a6 (refs: tails#20448)
[tails.git] / config / chroot_local-hooks / 05-adduser_tails-persistent-storage
blob16ed369d1d675c807856f92612fc154ed5167d37
1 #!/bin/sh
3 set -e
5 # Create the tails-persistent-storage user.
7 # We start the tps-frontend program as this user, which allows us to give it
8 # the privilege to connect to the tps backend, which we don't want to give to
9 # the desktop user.
11 # We also create the persistence.conf and live-additional-software.conf files
12 # as owned by this user, to stay fully compatible with older Tails versions,
13 # which expect those files to be owned by that user.
15 # The UID and GID for this user and group need to remain the same (respectively:
16 # 115 and 122) across Tails releases. If these UID and GID changed:
17 # - when enabling a persistent volume, persistence configuration files
18 # created with older Tails versions would be treated as unsafe and
19 # thus disabled;
20 # - Older Tails versions would be able to modify the Persistent Storage
21 # configuration
23 echo "Creating the tails-persistent-storage user"
25 # If this fails because UID 115 or GID 122 are already in use,
26 # move the "stealer" user/group out of the way in 04-change-gids-and-uids.
28 addgroup --system --gid 122 tails-persistent-storage
29 adduser --system --uid 115 --gid 122 --no-create-home tails-persistent-storage