This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Scripting user creation

Is it possible to script local user creation to avoid having to manually create 100 users by Webadmin?

Presumably I could just log in via SSH and use standard Linux useradd commmands etc. Is there anything I'm missing? Eg how do you set permissions for the user?

Many thanks in advance for any advice,

Jon Potter


This thread was automatically locked due to age.
Parents
  • Just a thought,
    could it be easier for you to use something like Radius/SAM/ActiveDirectory authentification if you have an existing network with those users ?
    You could save all the double configuration.
  • Hi, and thanks for the response.

    I am keen to not use RADIUS/NTLM so that I can add in an extra layer of security and implement a secondary password.
  • Unless they changed things recently, Astaro does not use Linux user accounts for VPN access; a machine VPNing in needs access to the network, not to be able to log in to the firewall! (yeah, you can configure an account to not have shell privileges, but Astaro wants to keep firewall user info as far away as possible from conventional Linux access mechanisms, to better the odds of preventing a breach...).

    In /etc/wfe/conf are the configuration files (text) for Astaro; a Bash script could update them. The machine would have to be backed up first, and it should be done at off-peak hours. Another person said recently there can be a problem for Astaro's kernel with updating the files; hopefully that's not the case, otherwise that would imply that Astaro lost some of its functionality.

    P.S. You will have to be responsible if you make any mistakes doing this; it is not "sanctioned" by Astaro...
Reply
  • Unless they changed things recently, Astaro does not use Linux user accounts for VPN access; a machine VPNing in needs access to the network, not to be able to log in to the firewall! (yeah, you can configure an account to not have shell privileges, but Astaro wants to keep firewall user info as far away as possible from conventional Linux access mechanisms, to better the odds of preventing a breach...).

    In /etc/wfe/conf are the configuration files (text) for Astaro; a Bash script could update them. The machine would have to be backed up first, and it should be done at off-peak hours. Another person said recently there can be a problem for Astaro's kernel with updating the files; hopefully that's not the case, otherwise that would imply that Astaro lost some of its functionality.

    P.S. You will have to be responsible if you make any mistakes doing this; it is not "sanctioned" by Astaro...
Children
  • Hi, and thanks for the reply.

    That sounds like a good idea to me. My only problem is knowing how to add the password to localusers.ini. 

    How can I generate the encrypted passwords?

    Thanks for the help. 
    Jon
  • The user data is also stored in /var/confd/storage.xml. If you add new users only to /etc/wfe/conf/localusers.ini you will run in problems, because the configruation in storage.xml is missing. This might lead to inconsistencys.

    I highly recommend to use an external user database, if you have to import hundreads of users.

    Xeno