# UID and maintenance reservation

**URL:** https://community.openpbs.org/t/uid-and-maintenance-reservation/3633
**Category:** Users/Site Administrators
**Created:** [August 3, 2023, 4:05pm UTC](https://community.openpbs.org/t/uid-and-maintenance-reservation/3633 "2023-08-03T16:05:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![tuthmose](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/tuthmose/32/635_2.png) [@tuthmose](https://community.openpbs.org/u/tuthmose)
#### Post date: [August 3, 2023, 4:05pm UTC](https://community.openpbs.org/t/uid-and-maintenance-reservation/3633/1 "2023-08-03T16:05:58Z")

</div>

Hi all,

a question about maintenance reservation. The ` pbs_rsub` man page tell that you type something like (as root on the PBS primary)

```auto
pbs_rsub -R <start> -E <end> --hosts host1 host2

```

however when I try this I get

```auto
Bad effective UID for reservation

```

note that I can create reservations as a user (albeit I am still unsure about confirming them); adding `-u`  
or `-U` options does not help. I have `set server flatuid = True`.

What I am doing wrong?

Addendum: i become root with either `sudo -i` or `sudo -s` I cannot do `su`; btw doing `sudo pbs_rsub ...` yields the same result.

---

<div class="post-metadata">

### Author: ![adarsh](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@adarsh](https://community.openpbs.org/u/adarsh)
#### Post date: [August 4, 2023, 6:38am UTC](https://community.openpbs.org/t/uid-and-maintenance-reservation/3633/2 "2023-08-04T06:38:29Z")

</div>

If you would like to set a maintenance reservation as root user.  
`qmgr -c "set server acl_roots=root"`  
Caution: root can run jobs on the cluster now .

---

<div class="post-metadata">

### Author: ![tuthmose](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/tuthmose/32/635_2.png) [@tuthmose](https://community.openpbs.org/u/tuthmose)
#### Post date: [August 4, 2023, 7:39am UTC](https://community.openpbs.org/t/uid-and-maintenance-reservation/3633/3 "2023-08-04T07:39:53Z")

</div>

Hi Adarsh,

thank you for your reply. I tried with root because running

```auto
pbs_rsub -R x -E x+y --hosts host1 host2 

```

run as a user yielded

```auto
pbs_rsub: Unauthorized Request

```

on the other hand, executing the command as root bu tyring to assign the reservation to another user with `-u`, `-U` (or both) still gave `Bad effective UID`. So I am a bit confused regarding who would the best user to create manteinance reservations and how.

Thank you

---

<div class="post-metadata">

### Author: ![vchlum](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/vchlum/32/93_2.png) [@vchlum](https://community.openpbs.org/u/vchlum)
#### Post date: [September 27, 2023, 5:35am UTC](https://community.openpbs.org/t/uid-and-maintenance-reservation/3633/4 "2023-09-27T05:35:08Z")

</div>

Hi @tuthmose, you need to be an operator to set maintenance reservations. You can set operators via qmgr.

---

<div class="post-metadata">

### Author: ![tuthmose](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/tuthmose/32/635_2.png) [@tuthmose](https://community.openpbs.org/u/tuthmose)
#### Post date: [September 27, 2023, 5:54am UTC](https://community.openpbs.org/t/uid-and-maintenance-reservation/3633/5 "2023-09-27T05:54:37Z")

</div>

Hi, vchlum

thank you, good to know.
