--- old/usr/src/cmd/Makefile	Sat Sep 19 02:58:54 2015
+++ new/usr/src/cmd/Makefile	Sat Sep 19 02:58:54 2015
@@ -432,6 +432,7 @@
 	users		\
 	utmp_update	\
 	utmpd		\
+	uuidgen		\
 	valtools	\
 	vgrind		\
 	vi		\
--- /dev/null	Sat Sep 19 02:58:55 2015
+++ new/usr/src/cmd/uuidgen/Makefile	Sat Sep 19 02:58:55 2015
@@ -0,0 +1,35 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
+#
+
+PROG= uuidgen
+
+include ../Makefile.cmd
+
+CFLAGS +=	$(CCVERBOSE)
+LDLIBS += -luuid
+
+C99MODE = $(C99_ENABLE) 
+
+.KEEP_STATE:
+
+all: $(PROG)
+
+install: all $(ROOTPROG)
+
+clean:
+
+lint:	lint_PROG
+
+include ../Makefile.targ
--- /dev/null	Sat Sep 19 02:58:55 2015
+++ new/usr/src/cmd/uuidgen/uuidgen.c	Sat Sep 19 02:58:55 2015
@@ -0,0 +1,102 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <libgen.h>
+#include <uuid/uuid.h>
+#include <getopt.h>
+#include <locale.h>
+
+static char *progname;
+static int rflag, tflag;
+static char uu_string[UUID_PRINTABLE_STRING_LENGTH];
+
+static void
+usage(void)
+{
+	(void) fprintf(stderr, gettext(
+	    "Usage: %s [-r | -t] [-o filename]\n"), progname);
+	exit(1);
+}
+
+int
+main(int argc, char *argv[])
+{
+	FILE *out;
+	uuid_t  uu = { 0 };
+	int c;
+
+	(void) setlocale(LC_ALL, "");
+
+#if !defined(TEXT_DOMAIN)
+#define	TEXT_DOMAIN "SYS_TEST"
+#endif
+	(void) textdomain(TEXT_DOMAIN);
+
+	progname = basename(argv[0]);
+	out = stdout;
+	while ((c = getopt(argc, argv, ":rto:")) != EOF) {
+		switch ((char)c) {
+		case 'r':
+			rflag++;
+			break;
+		case 't':
+			tflag++;
+			break;
+		case 'o':
+			if ((out = fopen(optarg, "w")) == NULL) {
+				(void) fprintf(stderr, gettext(
+				    "%s: cannot open %s\n"),
+				    progname, optarg);
+				return (1);
+			}
+			break;
+		case '?': /* fallthrough */
+		default:
+			usage();
+		}
+	}
+
+	if ((rflag && tflag) || optind != argc) {
+		usage();
+	}
+
+	if (rflag) {
+		/* DCE version 4 */
+		uuid_generate_random(uu);
+	} else if (tflag) {
+		/* DCE version 1 */
+		uuid_generate_time(uu);
+	} else {
+		uuid_generate(uu);
+	}
+
+	if (uuid_is_null(uu) != 0) {
+		(void) fprintf(stderr, gettext(
+		    "%s: failed to "
+		    "generate uuid\n"), progname);
+		exit(1);
+	}
+
+	uuid_unparse(uu, uu_string);
+
+	(void) fprintf(out, "%s\n", uu_string);
+
+	if (out != NULL && out != stdout)
+		(void) fclose(out);
+
+	return (0);
+}
--- old/usr/src/man/man1/Makefile	Sat Sep 19 02:58:55 2015
+++ new/usr/src/man/man1/Makefile	Sat Sep 19 02:58:55 2015
@@ -404,7 +404,8 @@
 	 	units.1				\
 	 	unix2dos.1			\
 	 	uptime.1			\
-	 	vacation.1			\
+		uuidgen.1			\
+		vacation.1			\
 	 	vgrind.1			\
 	 	volcheck.1			\
 	 	volrmmount.1			\
--- /dev/null	Sat Sep 19 02:58:55 2015
+++ new/usr/src/man/man1/uuidgen.1	Sat Sep 19 02:58:55 2015
@@ -0,0 +1,63 @@
+.\"
+.\" This file and its contents are supplied under the terms of the
+.\" Common Development and Distribution License ("CDDL"), version 1.0.
+.\" You may only use this file in accordance with the terms of version
+.\" 1.0 of the CDDL.
+.\"
+.\" A full copy of the text of the CDDL should have accompanied this
+.\" source.  A copy of the CDDL is also available via the Internet at
+.\" http://www.illumos.org/license/CDDL.
+.\"
+.\" Copyright 2015 Nexenta Systems, Inc.
+.\"
+.Dd Sep 13, 2015
+.Dt UUIDGEN 1
+.Os
+.Sh NAME
+.Nm uuidgen
+.Nd command-line utility to generate UUID's
+.Sh SYNOPSIS
+.Nm uuidgen [-r | -t] [-o filename]
+.Sh DESCRIPTION
+The
+.Nm
+command generates and prints a Universally Unique
+IDentifier (UUID). By default
+.Nm
+creates a new UUID based on high-quality randomness from
+arc4random(3C) (DCE version 4). If the \fB-t\fR option is
+provided then a time-based (DCE version 1) UUID will be
+generated.
+.Sh OPTIONS
+.Bl -tag -width indent
+.It Fl r
+Generate a UUID using
+.Nm uuid_generate_random()
+instead of
+.Nm uuid_generate() .
+This derives the new UUID from random data.
+.It Fl t
+Generate a UUID using
+.Nm uuid_generate_time()
+instead of
+.Nm uuid_generate() .
+This uses the current time and either the
+Ethernet address (if available) or system node ID.
+.It Fl o
+Redirect output to
+.Ar filename
+instead of stdout.
+.El
+.Sh EXIT STATUS
+.Bl -tag -width Ds
+.It Dv 0
+Successful completion.
+.It Dv >0
+Failure.
+.El
+.Sh INTERFACE STABILITY
+.Sy Uncommitted .
+.Sh SEE ALSO
+.Xr uuid_generate 3uuid ,
+.Xr uuid_generate_random 3uuid ,
+.Xr uuid_generate_time 3uuidd
--- old/usr/src/pkg/manifests/SUNWcs.man1.inc	Sat Sep 19 02:58:55 2015
+++ new/usr/src/pkg/manifests/SUNWcs.man1.inc	Sat Sep 19 02:58:55 2015
@@ -200,6 +200,7 @@
 file path=usr/share/man/man1/uname.1
 file path=usr/share/man/man1/uniq.1
 file path=usr/share/man/man1/uptime.1
+file path=usr/share/man/man1/uuidgen.1
 file path=usr/share/man/man1/w.1
 file path=usr/share/man/man1/wait.1
 file path=usr/share/man/man1/wc.1
--- old/usr/src/pkg/manifests/SUNWcs.mf	Sat Sep 19 02:58:55 2015
+++ new/usr/src/pkg/manifests/SUNWcs.mf	Sat Sep 19 02:58:55 2015
@@ -848,6 +848,7 @@
 file path=usr/bin/tty mode=0555
 file path=usr/bin/tzselect mode=0555
 file path=usr/bin/userattr mode=0555
+file path=usr/bin/uuidgen mode=0555
 file path=usr/bin/vmstat mode=0555
 file path=usr/bin/which mode=0555
 file path=usr/bin/who mode=0555
