Originally Posted by chrwei
what part of "add linux account AND samba account" was unclear to you in the first post? also smbpasswd -a was already suggested.
I don't mean to dicourage you from trying to help people, but PLEASE read and understand the question, as well as the previous answers, before responding. anythign else is just noise and polution.
Thing is when you use tone like that, people who do know the answer think,"Why should I bother" Maybe the guy did not have the mental capacity or knowledge to answer correct but he it trying. As are you. Simple questions like your's, someone like me could also consider "noise and pollution" since the solution is well documented. Just have a bash script that passes all available parameters to useradd and smbpasswd in that order and no user interaction is necessary.The only tricky bit is when you pass the -p parameter to useradd it should be in encrypted format (by the crypt function ) read up on the parameters for useradd and smbpasswd. A good way to get the encrypted password is to add a fake user first, with the desired password, copy the password out of /etc/shadow then delete the fake user. Good luck to you. I realize this is an old post, but I'm answering for the benefit of others still looking for a solution.