Quantcast
Channel: useradd from jenkins user error: useradd: cannot lock /etc/passwd; try again later - Server Fault
Viewing all articles
Browse latest Browse all 2

Answer by Freddy for useradd from jenkins user error: useradd: cannot lock /etc/passwd; try again later

$
0
0

You could add user jenkins to the wheel group with sudo privileges (as root)

usermod -aG wheel jenkins

and then use this in your script

echo "jenkins-password" | sudo -S /usr/sbin/useradd -p "pass" "username"

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>