remove contrib/passwd-assign0.awk

This commit is contained in:
Motiejus Jakštys 2022-07-27 07:48:14 -07:00
parent 4bd44d10b7
commit 8ec16474f7

View File

@ -1,30 +0,0 @@
#!/usr/bin/awk -f
# Assign a new uid for users that have uid=0
BEGIN {
FS=":";
max_uid = 0;
i = 0;
}
{
max_uid = ($3 > max_uid ? $3 : max_uid);
if ($3 == "0") {
uid0[i] = $0;
} else {
good[i] = $0;
}
i += 1;
}
END {
for (i in good) {
print good[i];
}
for (i in uid0) {
max_uid += 1;
split(uid0[i], f, ":");
print f[1]":"f[2]":"max_uid":"f[4]":"f[5]":"f[6]":"f[7];
}
}