File: passwd

package info (click to toggle)
open-infrastructure-system-config 20161101-lts1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 748 kB
  • ctags: 115
  • sloc: sh: 2,160; makefile: 166
file content (30 lines) | stat: -rwxr-xr-x 354 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

echo
echo "live-config hook: passwd"

_USERNAME=""

while [ "${_USERNAME}" != q ]
do
	echo
	echo -n "Enter username [q for quit]: "

	read _USERNAME

	_USERNAME="${_USERNAME:-${LIVE_USERNAME}}"

	case "${_USERNAME}" in
		root)
			passwd
			;;

		*)
			if [ -n "${_USERNAME}" ]
			then
				echo
				passwd "${_USERNAME}"
			fi
			;;
	esac
done