0

I have an issue with cloning a git repository (Devstack) as another user. I'm currently logged in as Administrator, but because I need to install Devstack as another user I want to execute all commands as 'Devstack' user. Therefor I would like to execute these commands through my admin account by using the 'su' command. Everything seems to work except this one, I don't know what I do wrong here. Let's hope some of you could help me?

I will put the code under this sentence and I hope one of you could help me?

code: sudo su -l devstack -c "git clone https://git.openstack.org/openstack-dev/devstack"

SOLVED!

  • Can the user devstack write to the current directory where you issue the command? – Thinkeye Feb 27 '18 at 08:34
  • Yes it can.... because all of a sudden the script with that command does work now... and I have changed nothing. But now another command doesnt work The code for that one is this: sudo su -l devstack -c "./stack.sh" It has an issue with 'su' – DaedalusPrime Feb 27 '18 at 09:03
  • I think the issue is in the beginning when I want to change directory via other user. Code: sudo su -l devstack -c 'cd openstack' – DaedalusPrime Feb 27 '18 at 09:58
  • Just do sudo su bash and work directly in the user context. That way you can verify the working directory and environment variables. I do that always when the impersonation gives me headaches. – Thinkeye Feb 27 '18 at 11:52

0 Answers0