Opened 13 months ago

Last modified 10 months ago

#988 assigned enhancement

Setup bccd user

Reported by: skylar Owned by: skylar
Priority: major Milestone: 3.4.0-build_ng
Component: Both Version:
Keywords: Cc:
Blocked By: Blocking:
Estimated Hours: 1 Total Hours: 0

Description (last modified by skylar)

  1. Add user
  2. Set password

Change History (31)

comment:1 Changed 13 months ago by skylar

  • Description modified (diff)
  • Status changed from new to assigned

comment:2 Changed 13 months ago by skylar

In 5852//cluster/svnroot:

add bccd user and set bccd-stage for passwd generation re #988

comment:3 Changed 13 months ago by skylar

In 5853//cluster/svnroot:

adding systemd unit file for bccd-passwd re #988

comment:4 Changed 13 months ago by skylar

In 5854//cluster/svnroot:

enable bccd-passwd service re #988

comment:5 Changed 13 months ago by skylar

In 5855//cluster/svnroot:

set default shell to bash re #988

comment:6 Changed 13 months ago by skylar

In 5856//cluster/svnroot:

diverting useradd re #988

comment:7 Changed 13 months ago by skylar

In 5857//cluster/svnroot:

make sure we are on tty1 for bccd-passwd re #988

comment:8 Changed 13 months ago by skylar

In 5858//cluster/svnroot:

debian uses basic.target re #988

comment:9 Changed 13 months ago by skylar

In 5859//cluster/svnroot:

do not restart on exit re #988

comment:10 Changed 13 months ago by skylar

In 5860//cluster/svnroot:

start bccd-passwd once per boot, not per login re #988

comment:11 Changed 13 months ago by skylar

In 5861//cluster/svnroot:

start bccd-passwd once per boot, not per login re #988

comment:12 Changed 12 months ago by skylar

consider: maybe we should do this as a X11 prompt

comment:13 Changed 12 months ago by skylar

no home directory, need to fix that too

comment:14 Changed 12 months ago by skylar

In 5868//cluster/svnroot:

make bccd home directory re #988

comment:15 Changed 12 months ago by skylar

Booting on Bob reveals that the password is prompted for, but systemd does not wait despite Type=oneshot.

comment:16 Changed 12 months ago by skylar

This runs, but generates EIO errors on writing to the TTY devices:

# $Id: bccd-passwd.service 5875 2017-01-29 19:46:02Z skylar $

[Unit]
Description="Set BCCD user password"
After=getty@tty1.service

[Service]
ExecStart=/usr/bin/strace -fo /var/tmp/bccd-passwd-wrapper.trace /bin/bccd-passwd-wrapper bccd
Type=oneshot

# This service is expected to exit completely even if it is successful
RemainAfterExit=yes

# Do not restart after everything exits
Restart=no

# This service requires user interaction via the TTY
StandardInput=tty
StandardOutput=tty
TTYPath=/dev/tty1
# TTYReset *must* be disabled so that the service does not get disconnected from its tty
TTYReset=no
TTYVHangup=yes

[Install]
WantedBy=basic.target

comment:17 Changed 12 months ago by skylar

next test: TTYReset=yes

comment:18 Changed 12 months ago by skylar

TTYReset=yes still causes an error

comment:19 Changed 12 months ago by skylar

next test: Run on tty2

comment:20 Changed 12 months ago by skylar

In 5877//cluster/svnroot:

got the right tricks re #988

comment:21 Changed 12 months ago by skylar

This latest change works, but hangs after setting the password

comment:22 Changed 12 months ago by skylar

going to try chvt at the end of bccd-passwd-wrapper

comment:23 Changed 12 months ago by skylar

In 5878//cluster/svnroot:

change back to tty1 after password change to avoid hang re #988

comment:24 Changed 12 months ago by skylar

In 5879//cluster/svnroot:

add ticket to comment re #988

comment:25 Changed 11 months ago by skylar

In 5913//cluster/svnroot:

use bccd user skeleton for bccd user re #988

comment:26 Changed 10 months ago by skylar

In 5920//cluster/svnroot:

try to start bccd-passwd before graphics re #988

comment:27 Changed 10 months ago by skylar

going to try some changes to bccd-passwd.service:

WantedBy?=multi-user.target Type=forking

comment:28 Changed 10 months ago by skylar

In 5923//cluster/svnroot:

remove old bccd-passwd utilities re #988

comment:29 Changed 10 months ago by skylar

In 5924//cluster/svnroot:

only use chvt if not using a TTY re #988

comment:30 Changed 10 months ago by skylar

In 5925//cluster/svnroot:

run script on bccd user login to setup password, etc. re #988

comment:31 Changed 10 months ago by skylar

In 5926//cluster/svnroot:

bccd-passwd-wrapper on bccd user auto-login re #988

Note: See TracTickets for help on using tickets.