|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
||||
Well, in all fairness 70-80% of the changes that have happened in the user land since early UNIX, were either by people who wanted to add them or got paid to lol.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
Sorry for the hijack
I swear to God, I must be blind, I genuinely cannot see the man page text that BSDKaffee posted, I've ran a word search in Firefox on the online manual page and I cannot find the text BSDKaffee quoted- can you point out to me the exact wording in the man page? |
|
|||
Quote:
Also as I said before, the command that BSDKaffee gave me: Code:
pw groupmod group -d username Code:
pw: illegal option -- d pw: unknown switch |
|
||||
Ok, I apologize. I didn't realize how new the option was (it was commited in February. It is in 7.0-STABLE, however, which is what I am using.
As a cop out I made this script to remove a specified user from a specified group: Code:
#!/bin/sh # Remove a user from a group # Usage: groupmod.sh <groupname> <username> # Use only one group and one user at a time...multiple users could be done from another script GROUP=$1 USER=$2 PW=/usr/sbin/pw SED=/usr/bin/sed if [ -z "$1" ] then echo "Oops! You forgot to specify the Group." exit 1 fi if [ -z "$2" ] then echo "Oops! You forgot to specify the Username." exit 1 fi # Show existing users in the group and use sed to remove them from the list NEWMEMBERS=`${PW} groupshow ${GROUP} -P | ${SED} -e '1d' -e 's|^[ \t]*||' -e 's|Members: ||' -e "s|${USER}||g" -e 's|,$||'` # Feed pw the list of users that were in the group minus the deleted user ${PW} groupmod ${GROUP} -M ${NEWMEMBERS} |
|
|||
I thought you may have been running a more bleeding edge version so I looked at the on-line pw man page for -STABLE and -CURRENT but its not in there either, the on-line man pages must not have been updated yet.
So the answer to my original question is to edit /etc/group, use the script you've provided (thanks for that) or update to -STABLE. Ah well, mystery solved. |
|
|||
Hmm... I was misreading my manpage... the entry I was refering to was for adding a user to a group... strange.
uname -r 7.0-RELEASE-p1
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Opera Port - conflicting pkgs in "make install" | IronForge | OpenBSD Packages and Ports | 5 | 29th October 2009 05:10 AM |
Fixed "xinit" after _7 _8, "how" here in case anyones' "X" breaks... using "nvidia" | jb_daefo | Guides | 0 | 5th October 2009 09:31 PM |
"Thanks" and "Edit Tags". | diw | Feedback and Suggestions | 2 | 29th March 2009 12:06 AM |
Newbie-friendly "printing in OpenBSD" guide wanted | Shagbag | OpenBSD Packages and Ports | 5 | 7th July 2008 09:26 PM |