Saving passwords for multiple Skype accounts

I have two Skype accounts; one for work, and one for personal use. Unfortunately, the Skype client for Linux is somewhat limited. It can store two usernames, but it saves only the last password entered. Tonight, I hacked up a solution.

I ran the Skype binary from the command line, and saw this:

tyler@baal:~$ skype --help
Skype 2.1.0.81

Usage: skype [options]
Options:
  --dbpath=       Specify an alternative path to store Skype data files.
                        Default: ~/.Skype
  --resources=    Specify a path where Skype can find its resource files.
                        Default: /usr/share/skype
  --disable-api         Disable Skype Public API.
  --pipelogin           Command line login. "echo username password | skype --pipelogin"
...

This immediately suggested two possibilities.

  1. Create a script that reads usernames and passwords from a file, then calls echo username password | skype --pipelogin. Obviously the file is a security risk, but don’t fool yourself. The obfuscated password in the Skype configuration file is no safer.
  2. Create a ~/.Skype-name directory for each account, and call skype --dbpath ~/.Skype-name. This has the advantage of letting Skype store the password, but means any configuration changes to Skype have to be made twice.

I opted for the former, because I like writing bash scripts that call zenity or kdialog. First I created a file:

cat > ~/.Skype/passwords

workuser1 password1
homeuser2 password2

^Ctrl-D
chmod 600 ~/.Skype/passwords

Then I wrote a simple script to do the following:

  1. Read the password file
  2. Display a zenity dialog with a list of usernames
  3. Find the password of the selected user
  4. Call Skype

Here it is: skype-fe. It worked on the first try. It’s a total hack, and I love it. It is based on previous zenity scripts I’ve written, so it’s not quite as simple as I let on. It won’t shred your hard drive, I promise.

Tags:

  1. Frank Martin’s avatar

    how to find my password if my session is logged in? where will this temporarily store the pass during its logged in session?

    Reply

    1. Tyler Wagner’s avatar

      The Skype software stores the password in an obscured form in its config files. I haven’t researched how to decode it. My hack here doesn’t temporarily store the password. It permanently stores it in a readable file. That is a risk you can decide if you want to take. I use a password unique to Skype, so I don’t really care.

      Reply

    2. Baljinder Singh’s avatar

      Hello Sir

      Sir i want .Skype/password path change in skype.fe script file How to do this ???? i want .Skype/password file on network path.

      Thanks

      Reply

      1. Tyler Wagner’s avatar

        You can edit the script and set the file path to anything you want, including something mounted from the network. I’m sorry, but I can’t advise you on all the details. I suggest starting by researching how to mount network filesystems.

        Reply

        1. Baljinder Singh’s avatar

          Hello Sir

          I know that network file system mounting but how can define the path in this file “PASSWORD_FILE=”$HOME/.Skype/passwords” ?????

          Reply

          1. Tyler Wagner’s avatar

            Just set the variable to wherever you want to store the passwords. You will need to create any missing directories:

            PASSWORD_FILE=”/path/to/network/mount/.Skype/passwords”

            Reply

            1. Baljinder Singh’s avatar

              Hello sir

              I have configure NFS ip is 192.168.1.10. how to path in this file PASSWORD_FILE=”/path/to/network/mount/.Skype/passwords” ?????????

              Reply

              1. Tyler Wagner’s avatar

                You must mount your NFS share somewhere in the local filesystem, and use that. Here’s an example from Red Hat.

                For instance, you must have an /etc/fstab entry like this (args at the end may vary):

                192.168.1.10:/nfs/share/path    /mnt/myserver   nfs    rsize=8192,wsize=8192,timeo=14,intr
                

                And you must then mount the share:

                mount /mnt/myserver
                

                Then you would use:

                PASSWORD_FILE="/mnt/myserver/.Skype/passwords"
                

                What I’ve skipped over is creating any directories in between, like /mnt/myserver/here/is/my/long/path/.Skype/passwords. These choices are up to you.

                Reply

              2. IT Admin’s avatar

                Hello sir

                I wont to run multiusers login in skype by skype-fe script file ???? how to this ???

                Reply

                1. Tyler Wagner’s avatar

                  Sorry, I don’t know if this is possible. I no longer use Skype.

                  Reply

                2. Abdul wahab’s avatar

                  how to find my password if my session is logged in? where will this temporarily store the pass during its logged-in session?

                  Reply

Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.