# Qdel delete all user job

**URL:** <https://community.openpbs.org/t/qdel-delete-all-user-job/1573>\
**Category:** Users/Site Administrators\
**Created:** [April 28, 2019, 6:34am UTC](https://community.openpbs.org/t/qdel-delete-all-user-job/1573 "2019-04-28T06:34:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![inside](https://avatars.discourse-cdn.com/v4/letter/i/bc79bd/32.png) [@inside](https://community.openpbs.org/u/inside)\
**Post date:** [April 28, 2019, 6:34am UTC](https://community.openpbs.org/t/qdel-delete-all-user-job/1573/1 "2019-04-28T06:34:46Z")

</div>

Hi Admin’s  
Recently I have started work with PBS Version 19.1.1 everything running good. I have multiple user e.g User1, User2  
**Issue is** user1 can qdel job of user2 and vice-versa. Why it’s getting I’m not getting why. Please help to resolve same.

---

<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:** [April 28, 2019, 6:22pm UTC](https://community.openpbs.org/t/qdel-delete-all-user-job/1573/2 "2019-04-28T18:22:03Z")

</div>

By default standard users cannot delete other users jobs , only “root” user can delete other users jobs.  
If user1 and user2 are added as managers / operators then there is a possibility.

If you can share the output of the below commands

- qmgr -c ‘p s’ output
- cat /etc/sudoers | grep user
- qstat -Bf

---

<div class="post-metadata">

**Author:** ![inside](https://avatars.discourse-cdn.com/v4/letter/i/bc79bd/32.png) [@inside](https://community.openpbs.org/u/inside)\
**Post date:** [April 29, 2019, 2:23am UTC](https://community.openpbs.org/t/qdel-delete-all-user-job/1573/3 "2019-04-29T02:23:28Z")

</div>

I have check /etc/sudoers there is no entry for any user.  
**1. qmgr -c "p s"**

# Create resources and set their properties.

# Create and define resource ngpus

# 

create resource ngpus  
set resource ngpus type = long  
set resource ngpus flag = hn

# 

# Create and define resource gpu\_id

# 

create resource gpu\_id  
set resource gpu\_id type = string  
set resource gpu\_id flag = h

# 

# Create and define queue workq

# 

create queue workq  
set queue workq queue\_type = Execution  
set queue workq enabled = True  
set queue workq started = True

# 

# Create and define queue gpu

# 

create queue gpu  
set queue gpu queue\_type = Execution  
set queue gpu enabled = True  
set queue gpu started = True

# 

# Set server attributes.

# 

set server scheduling = True  
set server default\_queue = workq  
set server log\_events = 511  
set server mail\_from = adm  
set server query\_other\_jobs = True  
set server resources\_default.ncpus = 1  
set server default\_chunk.ncpus = 1  
set server scheduler\_iteration = 600  
set server resv\_enable = True  
set server node\_fail\_requeue = 310  
set server max\_array\_size = 10000  
set server pbs\_license\_min = 0  
set server pbs\_license\_max = 2147483647  
set server pbs\_license\_linger\_time = 31536000  
set server eligible\_time\_enable = False  
set server max\_concurrent\_provision = 5

**2. qstat -Bf**  
Server: master  
server\_state = Active  
server\_host = master.hpc  
scheduling = True  
total\_jobs = 0  
state\_count = Transit:0 Queued:0 Held:0 Waiting:0 Running:0 Exiting:0 Begun  
:0  
default\_queue = workq  
log\_events = 511  
mail\_from = adm  
query\_other\_jobs = True  
resources\_default.ncpus = 1  
default\_chunk.ncpus = 1  
resources\_assigned.mem = 0gb  
resources\_assigned.ncpus = 0  
resources\_assigned.nodect = 0  
scheduler\_iteration = 600  
FLicenses = 20000000  
resv\_enable = True  
node\_fail\_requeue = 310  
max\_array\_size = 10000  
pbs\_license\_min = 0  
pbs\_license\_max = 2147483647  
pbs\_license\_linger\_time = 31536000  
license\_count = Avail\_Global:10000000 Avail\_Local:10000000 Used:0 High\_Use:  
0  
pbs\_version = 18.1.4  
eligible\_time\_enable = False  
max\_concurrent\_provision = 5  
power\_provisioning = False

---

<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:** [April 29, 2019, 4:49pm UTC](https://community.openpbs.org/t/qdel-delete-all-user-job/1573/4 "2019-04-29T16:49:32Z")

</div>

Thank you for sharing the output, the configuration is correct and you are running 18.1.4 .  
If users are able to delete each other’s job by default, then it seems a bug to me. Please increase the log level , submit jobs as user1 , user2 , delete jobs as user1 and user2 , collect/upload the PBS logs and create a ticket.

---

<div class="post-metadata">

**Author:** ![scc](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/scc/32/234_2.png) [@scc](https://community.openpbs.org/u/scc)\
**Post date:** [April 29, 2019, 6:07pm UTC](https://community.openpbs.org/t/qdel-delete-all-user-job/1573/5 "2019-04-29T18:07:50Z")

</div>

It is worth performing an ruserok() test to see what the OS says about the users/systems involved. When checking to see if remote\_user1@remote\_host can delete local\_user2’s job, PBS will run the ruserok() system function (which consults hosts.equiv/rhosts, etc.) to allow/deny this. It can be tested with the following program run on the PBS server host:

```
/*
   Two use cases:
    1) User submitting job from remote host to server getting unexpected
        "Bad UID" message. That is, user doesn't have access when he thinks
        he should.
    2) User(s) can delete, etc other user(s) jobs. That is, one user is able
        to act as what he thinks is a different user, server sees them as
        being equivalent.

Build with "cc ruserok.c -o ruserok"

Usage (run on the PBS server system):

ruserok remote_host remote_user1 local_user2

where:

remote_host: the host from which the job is being submitted, or where the PBS client command is issued

remote_user1: the username of the user submitting the job, or issuing the client command

local_user2: the username of the user remote_user1 is trying to submit the job as, or owner of the job that remote_user1 is trying to act on with the client command

*/

#include <errno.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
        int rc;
        char hn[257];

        if (argc != 4) {
                fprintf(stderr, "Usage: %s remote_host remote_user1 local_user2\n", argv[0]);
                return 1;
        }
        if (gethostname(hn, 256) < 0) {
                perror("unable to get hostname");
                return 2;
        }
        hn[256] = '\0';

        printf("on local host %s, from remote host %s\n", hn, argv[1]);
        rc = ruserok(argv[1], 0, argv[2], argv[3]);
        if (rc == 0)
                printf("remote user %s is allowed access as local user %s\n", argv[2], argv[3]);
        else
                printf("remote user %s is denied access as local user %s\n", argv[2], argv[3]);

        return 0;
}
```

---

<div class="post-metadata">

**Author:** ![inside](https://avatars.discourse-cdn.com/v4/letter/i/bc79bd/32.png) [@inside](https://community.openpbs.org/u/inside)\
**Post date:** [April 30, 2019, 1:45am UTC](https://community.openpbs.org/t/qdel-delete-all-user-job/1573/6 "2019-04-30T01:45:58Z")

</div>

Yes… I just roll back with old version to test…  
Issue is resolved: Actually every user coming from central ldap & there is issue in nsswitch. After removing entry of (sss) everything now working fine.  
Thanks !!

---

<div class="post-metadata">

**Author:** ![inside](https://avatars.discourse-cdn.com/v4/letter/i/bc79bd/32.png) [@inside](https://community.openpbs.org/u/inside)\
**Post date:** [April 30, 2019, 1:47am UTC](https://community.openpbs.org/t/qdel-delete-all-user-job/1573/7 "2019-04-30T01:47:08Z")

</div>

I have tried this too also and its was also working good… I have authenticated every user from master to node and it work fine
