Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This command fails on OpenSuSE 11.4:

root@host# sudo -S -u "coreapp_customer1_d" -g "coreapp_customer1_d"  /bin/bash -l -c "mkdir -p /home/coreapp_customer1_d/.ssh"

with this message:

Sorry, user root is not allowed to execute 
'/bin/bash -l -c mkdir -p /home/coreapp_customer1_d/.ssh' 
as coreapp_customer1_d:coreapp_customer1_d
on workdevel114.

but it works on OpenSuSE 12.3.

I compared the /etc/sudoers file of both systems, and (except for comment lines) they are the same.

share|improve this question
I would say not "root is not allowed to execute it", but the user you are trying to execute as (coreapp_customer1_d:coreapp_customer1_d) is not allowed to do this. Check the permissions of /home/coreapp_customer1_d and /home/coreapp_customer1_d/.ssh – Tim Oct 11 '13 at 7:55

I had this problem myself and could solve it with

root    ALL=(ALL:ALL) ALL

in visudo. The important part being :ALL. The sudoers man page says this:

In the following example, user tcm may run commands that access a modem device file with the dialer group.

tcm boulder = (:dialer) /usr/bin/tip, /usr/bin/cu,\ /usr/local/bin/minicom

Note that in this example only the group will be set, the command still runs as user tcm. E.g.

$ sudo -g dialer /usr/bin/cu

In my context using -g was the whole point since I wanted to know what a group can write to with:

sudo -u nobody -g some_group find . -writable 2> /dev/null > /tmp/some_group_writable.txt
share|improve this answer

I found a work around myself:

In my context the -g option (group) is not needed. If the command gets called without it, it works on the old distribution.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.