output of sudo -l confusing me

0

(habdbsync) NOPASSWD: ALL, (habdbsync) !/bin/sh, !/bin/ksh, !/bin/csh, !/bin/tcsh, !/bin/zsh, !/bin/bash, (habdbsync) !/bin/su,

(habdbsync) !/usr/bin/ssh, !/usr/bin/scp, !/usr/bin/slogin

(root) /bin/chown habdbsync /devbuild/*
(root) /bin/chown -R root\:root /devbuild/*
(root) /bin/chown root\:root /devbuild/*
(root) /bin/true

What each statement means ?

Niraj

Posted 2014-10-13T11:09:37.353

Reputation: 249

sudo -ll gives a more expanded output, which may help to explain the entries. My output is a lot different, so I cannot interpret your list. – AFH – 2014-10-13T11:25:56.193

Answers

1

The first line means that you cannot run any of the shells listed, nor su, as user habdbsync.

The second line means that you cannot run ssh, scp, or slogin as user habdbsync.

Note that in both the above, the exlamation mark (!) is a not operator.

The next four lines allow you to run the commands listed, but only as user root. Note that the commands also have arguments that need to match. Therefore you can run:

/bin/chown habdbsync /devbuild/*

as root with sudo, but not:

/bin/chown habdbsync /*

garethTheRed

Posted 2014-10-13T11:09:37.353

Reputation: 2 520