automate adding users with smbpasswd

view full story

http://www.ozzu.com – So Im getting my new server going and right now Im working on using smbpasswd to add approximately 287 users. Ive got a file with all my usernames and their passwords, seperated by a space. Yesterday when I created their accounts with home directories and set their passwords I used a little perl script to do it and it worked splendidly. Im not having as much luck with smbpasswd though.So I think I need to do smbpasswd -as username. The -s option puts it in silent mode and reads the password I input from stdin and doesnt prompt for the password. But I just cant get the damn thing to work. How do I input the password with one shell command so that I can automate it instead of typing 287 passwords twice?Topic Replies: 0 (HowTos)