I need a little help im writing a bash script which does the following.
Use kdialogue to grab username. Set to variable $username
Use kdialogue to grab userpass. Set to variable $userpass
Create a new user.
Set user password.
Add new user to jail ssh user group.
Add user to chroot jail via jailkit.
The problem is sudo passwd $username uses an interactive terminal prompt to request the new password and as im using gui elements the terminal window is hidden.
How do i get the password used in variable $userpass to the interactive utility?
Use kdialogue to grab username. Set to variable $username
Use kdialogue to grab userpass. Set to variable $userpass
Create a new user.
Set user password.
Add new user to jail ssh user group.
Add user to chroot jail via jailkit.
The problem is sudo passwd $username uses an interactive terminal prompt to request the new password and as im using gui elements the terminal window is hidden.
How do i get the password used in variable $userpass to the interactive utility?
Comment