Sponsored Content
Top Forums Programming Html form to submit data to bash script Post 303000678 by robertkwild on Monday 17th of July 2017 04:09:06 PM
Old 07-17-2017
Html form to submit data to bash script

hi all,

im going to design a web html form so users can input what username and password they want to make the ftp account, once they enter in a username and password they click on the submit button and it submits it to a bash script and then the bash script will run and finish of making the ftp account

the variables of both the html form and bash script are the same ie user passwd

it doesnt work, what am i doing wrong?

here is my html form page -
Code:
<form>
        <form action="/scripts/create_user.sh" method="post">
        Username:<br>
        <input type="text" name="user"><br><br>
        Password:<br>
        <input type="text" name="passwd"><br><br>
        <input type="submit" value="Submit">

</form>

what the form looks like -

Legacy Link Deleted

my bash script -
Code:
#!/bin/bash

dir=/sftp
group=sftpusers

echo "$user:$passwd" >> /ftp_details/accounts.csv

      useradd -g $group -d $dir/$user -s /sbin/nologin $user
      mkdir -p $dir/$user/data
      chown root $dir/$user
        chmod 755 $dir/$user
        chown $user $dir/$user/data
        chmod 755 $dir/$user/data
      touch $dir/$user/data/WARNING_everything_in_here_will_get_removed_in_14_days_time.txt

cheers,

rob
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PHP Help with Form Submit

Hi, I have a custom HTML form that has a couple radio buttons and a text field that requires a number. I'm not a php programmer and could use some help with putting together php code to calculate a total based on the radio button selection and the text field number. ... (3 Replies)
Discussion started by: nck
3 Replies

2. Shell Programming and Scripting

using wget to submit a form on linksys router

I'm trying to use wget to submit a form. I have tried to dig out what is actually being "posted" and where, using tamperdata (see below). http://ubuntuforums.org/attachment.php?attachmentid=109123&d=1239224127 Here is my wget command: wget --http-user=xyz --http-password=xyz... (1 Reply)
Discussion started by: mike909
1 Replies

3. UNIX for Dummies Questions & Answers

Bash script to insert data into an html table

hi, I need to create a bash shell script which picks up data from a text file and in the output file puts it into an html made table. I have to use sed and awk utilties to do this the input text file will contain data in the format: job name para1 para2 para3 para4 para4 1 ... (1 Reply)
Discussion started by: intern123
1 Replies

4. Shell Programming and Scripting

Bash shell script that inserts a text data file into an HTML table

hi , i need to create a bash shell script that insert a text data file into an html made table, this table output has to mailed.I am new to shell scripting and have a very minimum idea of shell scripting. please help. (9 Replies)
Discussion started by: intern123
9 Replies

5. Shell Programming and Scripting

Using cURL to submit a post form

I am trying to write a shell script to use curl in order to automate downloading data from a website. The URL with the post form is here: http://try-db.org/de/InfoBySpecies.php . I have a list of about 1800 different species I want to check. For Example, choose the first species and use the... (2 Replies)
Discussion started by: hansvg
2 Replies

6. Shell Programming and Scripting

Can't submit a form.

hello my script is submitting POST-data to a site (its not my first script, i've done these before many times (include parsing scripts) but this one is tough) so the problem is i'm submitting a form with firefox and in firebug i see WHAT exactly i'm submitting then when i do EXACTLY the... (28 Replies)
Discussion started by: tip78
28 Replies

7. UNIX for Dummies Questions & Answers

How to submit form on an php webpage from command line?

Hello, i have page domain.com/form.php the form fields on form.php are named: name=ipaddress name=port and submit button is named: submit i want to ask how the linux command will look like to submit the form filled with: ipaddress: 127.0.0.1 port: 80 I tried various curl and... (5 Replies)
Discussion started by: postcd
5 Replies

8. Shell Programming and Scripting

Exec submit form in bash script

Hi All, I'm new in forum. Many congratulations to everyone for all work. I'm not an expert in bash script I've a problem with a sh file. The sh file run every t minuts and it read data from txt file and then compile form. Finally, the user, from the web browser click on send. The script... (0 Replies)
Discussion started by: Herbert
0 Replies

9. Shell Programming and Scripting

Trying to submit web form content to a shell script

Hi I was hoping some one could help me with a problem I have. I am trying to collect some information from a web form and save it to a text file. I found an example on this site that is sort of what I am trying to accomplish, the shell script bellow should echo the input back to the browser... (0 Replies)
Discussion started by: Paul Walker
0 Replies
condor_store_cred(1)					      General Commands Manual					      condor_store_cred(1)

Name
       condor_store_cred securely - stash a password

Synopsis
       condor_store_cred [-help]

       condor_store_credadd[ -c | -u username] [-p password] [-n machinename] [-f filename]

       condor_store_creddelete[ -c | -u username] [-n machinename]

       condor_store_credquery[ -c | -u username] [-n machinename]

Description
       condor_store_credstores passwords in a secure manner. There are two separate uses of condor_store_cred:

	  1.  A  shared  pool  password  is needed in order to implement the  PASSWORD authentication method. condor_store_cred using the -coption
	  deals with the password for the implied  condor_pool@$(UID_DOMAIN) user name.

	  On a Unix machine, condor_store_cred with the -foption is used to set the pool password, as needed when used with the  PASSWORD  authen-
	  tication method. The pool password is placed in a file specified by the  SEC_PASSWORD_FILE configuration variable.

	  2. In order to submit a job from a Windows platform machine, or to execute a job on a Windows platform machine utilizing the run_as_own-
	  erfunctionality, condor_store_cred stores the password of a user/domain pair securely in the Windows registry. Using this  stored  pass-
	  word,  Condor  may act on behalf of the submitting user to access files, such as writing output or log files. Condor is able to run jobs
	  with the user ID of the submitting user. The password is stored in the same manner as the system does when setting or  changing  account
	  passwords.

       Passwords are stashed in a persistent manner; they are maintained across system reboots.

       The  addargument on the Windows platform stores the password securely in the registry. The user is prompted to enter the password twice for
       confirmation, and characters are not echoed. If there is already a password stashed, the old password will be overwritten by the new  pass-
       word.

       The deleteargument deletes the current password, if it exists.

       The queryreports whether the password is stored or not.

Options
       -c

	  Operations refer to the pool password, as used in the  PASSWORD authentication method.

       -f filename

	  For Unix machines only, generates a pool password file named filenamethat may be used with the  PASSWORD authentication method.

       -help

	  Displays a brief summary of command options.

       -n machinename

	  Apply the command on the given machine.

       -p password

	  Stores password, rather than prompting the user to enter a password.

       -u username

	  Specify the user name.

Exit Status
       condor_store_credwill exit with a status value of 0 (zero) upon success, and it will exit with the value 1 (one) upon failure.

Author
       Condor Team, University of Wisconsin-Madison

Copyright
       Copyright  (C)  1990-2012  Condor  Team,  Computer  Sciences Department, University of Wisconsin-Madison, Madison, WI. All Rights Reserved.
       Licensed under the Apache License, Version 2.0.

       See the Condor Version 7.8.2 Manualor http://www.condorproject.org/licensefor additional notices. condor-admin@cs.wisc.edu

								  September 2012					      condor_store_cred(1)
All times are GMT -4. The time now is 04:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy