Command Login with zenity in sh

Forum rules
Before you post please read how to get help
Post Reply
ruyzz
Level 1
Level 1
Posts: 19
Joined: Sat Feb 24, 2018 11:01 pm

Command Login with zenity in sh

Post by ruyzz » Thu Sep 20, 2018 10:38 pm

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!!!

Post Reply

Return to “Scripts & Bash”