Home   >>   Solaris   >>   How To Add A User From The Command Line In Solaris
How To Add A User From The Command Line In Solaris PDF Print E-mail
( 0 Votes )
How To - Solaris
Written by Christian Foronda   
Wednesday, 20 October 2010 09:46

Syntax:

	# useradd -d /export/home/chr1x2 -m -s /bin/bash -c "Christian Foronda" chr1x2

Options:

-d home-directory-path

This is the new user’s home directory, typically /export/home/username

-m
make home directory and copy the default skeleton files (these files are located in /etc/skel directory).

-u uid
The uid (userid) is a number from 0 to 65535 which identifies the user on the system. uid 0 is reserved for root. If you don’t specify one, the next available uid will be used automatically.

-c “User Name”
Comment field which usually contains the name of the user. Make sure you enclose the name in quotes if it contains a space.

-s /path/to/shell
The shell to use. If you don’t specify this, it will default to /bin/sh. Make sure you specify the fully qualified path.

Reference:
http://www.tech-recipes.com




blog comments powered by Disqus