Thursday, December 10, 2009

Adding users from the command line in Snow Leopard

This is just a quick tutorial on how to add users from the command line in snow leopard. This command will also work in previous versions of os x. The following commands need to be run as root or with the sudo command.


Creating a new user

dscl / -create /Users/bsdjedi

Create a new user and set the default shell for that user

dscl / -create /Users/bsdjedi UserShell /bin/ksh

Creating a new user and setting the uid as well

dscl / -create /Users/bsdjedi UniqueID 800

Setting the password when creating a user

dscl / -create /Users/bsdjedi PASSWORD

or you can use the tradition unix way and run the following:

passwd bsdjedi


If you would like to give a user admin right run the following command

dscl / -append /Groups/admin GroupMembership bsdjedi


This concludes my tutorial on add users in snow leopard ( os x ) from the command line if need more information just do a man dscl. :)

3 comments:

  1. what's this BSD Junk? go with the real mainstream unix, IBM AIX!! it is quick, easy and solid! never hear of a AIX box performing a Panic now have you! LOL!

    ReplyDelete
  2. Same here - Data source (/) is not valid.

    This command works better:

    sudo dscl . -create /Users/cassdb

    ReplyDelete

Cracking Kerberos Service Tickets (TGS) Using Kerberoasting

As of late I've been spending a lot of time researching and learning different techniques when it comes to attacking Active Directory En...