Command Login with zenity in sh

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
ruyzz

Command Login with zenity in sh

Post 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!!!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “Scripts & Bash”