Page 1 of 1

Command Login with zenity in sh

Posted: Thu Sep 20, 2018 10:38 pm
by ruyzz
The login command can start a new domain user and create it when authenticated with the user's password and this is created in the folder / home / domain.

The previous thing I found on the web but it does not do it with the login command:

    # Define the command, we use both username and password fields.
    ENTRY = `zenity --password --username`

    # Read the result from the command above
    case $? in
        0)
            # At this step, you can assign a variable to username's value like this:
            # VAR_USERNAME = `echo $ ENTRY | cut -d '|' -f1`
            
            # The result from ENTRY command look like: username | password
            # This command use to cut the first column -> get username
            echo "User Name:` ​​echo $ ENTRY | cut -d '|' -f1` "
            
            # This command use to cut the second column -> get password
            echo "Password:` echo $ ENTRY | cut -d '|' -f2` "
        ;;
        1)
            echo "Stop login." ;;
        -1)
            echo "An unexpected error has occurred." ;;
    that C

I do not know how to combine the login command with zenity.

Could you help me!!!