for f in /etc/passwd; This is a bit silly as there's really no loop with just one value.
But the issue seems to be printing single quotes from awk. You could escape them in the shell, but you could also use backslash-escapes within awk to print them. \xHH<i>OOO is the character with numerical value HHOOO (hexin octal), so \x27\047 is '. So this would be one way to do it:
awk -F: -vID=$ID_minimum '$3>=1000 && $1!="nfsnobody" { printf "xfs_quota -x -c \x27limit\047limit bsoft=5g bhard=6g %s\x27%s\047 /home\n", $1}' /etc/passwd You could use the similar escape in hex, \x27, but it can get misinterpreted in some implementations if the following character is a valid hexadecimal digit. (And of course I assumed ASCII or an ASCII-compatible character set, e.g. UTF-8.)