DragonFly bugs List (threaded) for 2004-08
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
FYI: pw group del -n <groupname starting with number> fails
Hi list,
While I was scripting together a batch user add script , I noticed that
when a groupname starts with 1 or more numerics , deleting with pw group
del -n fails.
However deleting the group using the ID works (pw group del -g <groupID>).
A workaround for this odd behaviour would be:
pw group del -g `grep GROUPNAME </etc/group | cut -f 3 -d:`
I thought you might want to know.
Here under is what I did to test:
# pw group add -n 5H1
# grep 5H1 < /etc/group
5H1:*:1002:
# pw group del -n 5H1
# grep 5H1 < /etc/group
5H1:*:1002:
# pw group del -n 5H1
pw: unknown group `5H1'
# grep 5H1 < /etc/group
5H1:*:1002:
# pw group del -g 1002
# grep 5H1 < /etc/group
hmm bummer so to check if it ain't local problem with pw I also did:
# pw group add -n t1st
# grep t1st </etc/group
t1st:*:1002:
# pw group del -n t1st
# grep t1st </etc/group
And also did it on my laptop with the same results, then I tested it
with a name starting with 3 numbers:
# pw group add -n 123for
# grep 123 </etc/group
123for:*:1002:
# pw group del -n 123for
pw: unknown group `123for'
# grep 123 </etc/group
123for:*:1002:
# pw group del -g 123for
pw: unknown group `123for'
# pw group del -n 1002
# grep 123 /etc/group
--
mph
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]