# Adding Warehouse Users

If you have more than one person working with your Segment Warehouse, you might want to create users for your team so that each person can have a discrete login. The three steps in this section will show you how to create a user, grant usage on a schema and then grant the privileges that the user will need to interact with that schema.

## 1. Creating a user with the CREATE USER command

Create a new user for your team with the [CREATE USER](http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_USER.html) command:

```sql
CREATE USER <name>
[IN GROUP <group>]
WITH PASSWORD <password>
[VALID UNTIL] <abstime>
```

The code above in \[] is optional, you don't need to group your users or give their credentials an expiration date, the code works without it. However, if you do choose to use those parameters, `<abstime>` should be formatted in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format, or '2015-09-13', which translates to September 13th, 2015.

For instance, you can create a user named `flashthesloth` as:

```sql
CREATE USER flashthesloth
WITH PASSWORD 'slow_is_beautiful'
```

To get a list of users in your destination, you can run the following SQL code:

```sql
SELECT * FROM pg_user
```

Now that we've confirmed that the user has been created, they already have access to the public schema that contains systems-level information about the cluster. To give them access to the specific schemas that they'll be working in, we'll need to run the GRANT USAGE command.

## 2. Grant usage on the schema

Next, you'd need to [GRANT USAGE](http://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html) on the schema to the user we just created:

```sql
GRANT USAGE ON SCHEMA <schema_name> TO <user>
```

The above SQL command grants the user USAGE privileges on a schema. As an example, if you wanted to grant `flashthesloth` access to your development schema, you'd run the following:

```sql
GRANT USAGE ON SCHEMA development TO flashthesloth
```

Our new user now has usage rights on the `development` schema. Now, we need to grant the type of SQL commands they'll be able to run against the cluster. For the purposes of this example, we're going to give the user read only privileges.

## 3. Grant select privileges

To grant your user specific privileges, run the [GRANT SELECT](http://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html) command so the user can query the tables:

```sql
GRANT SELECT ON ALL TABLES IN SCHEMA <schema_name> TO <user>
```

The above SQL command grants the user SELECT rights on all tables in the chosen schema. For our `flashthesloth` user and the `development` schema, it would look like below.

```sql
GRANT SELECT ON ALL TABLES IN SCHEMA development TO flashthesloth
```

Completing these three steps results in a new user that can query all the tables in a given schema. If you want to give your user access to more than one schema, repeat steps 2 and 3 for each additional schema. If you have any questions, or if you're running into any issues getting this set up, [contact Segment support](https://segment.com/help/contact/).
