debianuser Posted October 29, 2006 Share Posted October 29, 2006 Yo people I am wondering, how do you with only one command add a user to the system and also to the samba server... so like instead of going adduser toto password: blablabla and after smbpasswd too etc... is there a way to just do it with one command? maybe through a bashscript? thx Quote Link to comment Share on other sites More sharing options...
cooper Posted October 29, 2006 Share Posted October 29, 2006 A bit of googling found that the following will make smbpasswd's password prompting happy. Presumably something similar will work with useradd (although useradd accepts the paasword in encrypted form from the command line). echo -e "$passwordn$password" | smbpasswd -a -s $user && echo OK SMB Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.