Ask Your Question

how to switch the user in puppet agent from puppet manifest?

asked 2015-03-19 09:15:36 -0600

akshay gravatar image

updated 2015-03-19 09:16:44 -0600

I want to switch the user using puppet manifest. E.g On agent side it currently login with oracle user. But i want to switch the oracle user with database user using puppet manifest. So how to switch the user? Please help me.

edit retag flag offensive close merge delete


We probably need more information on what you want to do here. If you had to do this without Puppet, how would you go about this? Editing a config file? Adding a new user to the system? Restarting a service?

WhatsARanjit gravatar imageWhatsARanjit ( 2015-03-25 15:40:48 -0600 )edit

There is no need to edit the config file. Whenever we have to change the user through puppet script then simply write the in exec { command => su -c "USERNAME"},

akshay gravatar imageakshay ( 2015-04-15 00:30:14 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-15 00:33:06 -0600

akshay gravatar image

exec { command => "su -c USERNAME", }

edit flag offensive delete link more


But you would still need to input a password to switch over.. I think we're trying to get around putting passwords in puppet files

tonyroma gravatar imagetonyroma ( 2015-05-15 11:20:32 -0600 )edit

Where to put the password in puppet files? Please tell me.

akshay gravatar imageakshay ( 2015-05-21 08:28:45 -0600 )edit

well you could put them in a variable and then use that variable throughout all of the files. check this out

tonyroma gravatar imagetonyroma ( 2015-05-22 14:57:34 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-03-19 09:15:36 -0600

Seen: 232 times

Last updated: Apr 15 '15