Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8257151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:06:08+00:00 2026-06-08T02:06:08+00:00

i have a problem in this code public void setTmbhUserFtp(View v) { Spinner spinner

  • 0

i have a problem in this code

public void setTmbhUserFtp(View v) {
        Spinner spinner = (Spinner) findViewById(R.id.spinner);
        Server server = serverlist.get(spinner.getSelectedItemPosition() - 1);
        EditText EditAdduser = (EditText) findViewById(R.id.EditAdduser);
        EditText EditPassworduser = (EditText) findViewById(R.id.EditPassworduser);
        String sTextAdduser = EditAdduser.getText().toString();
        String sTextPassworduser = EditPassworduser.getText().toString();

        if (server != null && sTextAdduser.length() > 0
            && sTextPassworduser.length() > 0) {
        final String ADDUSER = "sh /home/add_user.sh".concat(sTextAdduser) .concat(sTextPassworduser);
        FtpConnect u = new FtpConnect();
        Command o = new Command(getResources().getText(R.string.adduser)
                .toString(), ADDUSER, server);
        u.setCommand(ADDUSER);

        pd = ProgressDialog.show(actual,
                getResources().getString(R.string.PleaseWait), o.getName());
        actualThreadCommand = o;
        Thread thread = new Thread(actual);
        thread.start();

    } else {
        Toast.makeText(getBaseContext(),
                getResources().getText(R.string.gagal), Toast.LENGTH_LONG)
                .show();
    }

}

that code is using for excute in linux like this

sh /home/add_user.sh username password

but when i try from my android the username and password is being one

so the code is like this

sh /home/add_user.sh usernamepassword

if username is irfan and password is irfan, the code is detect

sh /home/add_user.sh irfanirfan

so username being irfanirfan and dont have a password

the code add_user.sh is

useradd $1; echo -e "$2\n$2" | passwd $1

how to resolving

final String ADDUSER = "sh /home/add_user.sh ".concat(sTextAdduser) .concat(sTextPassworduser);

after .concat(sTextAdduser) must be space

so in linux will excute

sh /home/add_user.sh irfan irfan
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:06:10+00:00Added an answer on June 8, 2026 at 2:06 am

    This way you may solve your problem:

    final String ADDUSER = "sh /home/add_user.sh "+sTextAdduser+" "+sTextPassworduser;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with this code public static void main(String[] args) throws IOException,
I have a problem with this code: (The error is below the code) public
I have a problem with this code right here: - (void)fetchedData:(NSData *)responseData { //parse
Im create this code to store page view in database, but i have problem
i have a problem with this code: public partial class KnihovnyForm : Form {
I have this code: public void readTroops() { File file = new File(resources/objects/troops.txt); StringBuffer
I have this code: public void Contacts(string domainToBeTested, string[] browserList, string timeOut, int numberOfBrowsers)
I have code that looks like this: public class A { public void doStuff()
I have a problem with the following code: public static void RestoreToolStripMenuItem(ToolStripMenuItem item, List<string>.Enumerator
I have a problem in a WPF application. I wrote this code: public partial

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.