[CentOS] Slightly OT: check creation of a group
Stephen Harris
lists at spuddy.orgMon Mar 1 16:19:38 UTC 2010
- Previous message: [CentOS] Slightly OT: check creation of a group
- Next message: [CentOS] Slightly OT: check creation of a group
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Mar 01, 2010 at 05:12:15PM +0100, Geoff Galitz wrote: > I'd do it like this: > > grep medintux /etc/group > if [ $? != 0 ]; then > echo "Group not found" > fi Or allow for naming services (NIS, LDAP, whatever) if [ -z "$(getent group medintux)" ] then groupadd .... fi -- rgds Stephen
- Previous message: [CentOS] Slightly OT: check creation of a group
- Next message: [CentOS] Slightly OT: check creation of a group
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list