Solaris

From wiki.vincentkong.com
Jump to: navigation, search

Contents

Add user

$ useradd -d /export/home/username -m -s /bin/bash -c "User Name" username
  • -d 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).
  • -c comment field which usually contains the name of the user enclosed in quotes if it contains a space.
  • -s path to shell to use, defaults to /bin/sh. Use full path.

Add group

Add user to group:

$ usermod -G <groupname> <username>

Shutdown/reboot

To shutdown:

$ shutdown -y -i5 -g0

or

$ poweroff

To reboot:

$ shutdown -y -i6 -g0

or

$ reboot

Generate a self-signed certificate

Creates a self-signed certificate and stores the certificate in the PKCS #11 keystore.

$ pktool gencert keystore=pkcs11 label="My Cert" subject="C=US, \
O=My Company, OU=Security Engineering Group, CN=MyCA" serial=0x000000001
  • keystore - the keystore by type (nss, pkcs11, or ssl) of public key object (optional)
  • label - a unique name that the issuer gives to the certificate
  • subject - the distinguished name for the certificate
  • serial - the serial number in hexadecimal format. The issuer of the certificate chooses the number, such as 0x0102030405.

List certificates:

$ pktool list

Describe instruction set architectures

$ isainfo -v

Set user limits of system-wide resources

Display all current limits.

$ ulimit -a

Set maximum number of open files.

$ ulimit -n 1024

Paper icon.png Reference: http://ss64.com/bash/ulimit.html

Retrieved from "/wiki/Solaris"
Personal tools
MY WEBSITES