Can't login to ssh account after migration

Discussion in 'General' started by axxies, Aug 7, 2017.

  1. till

    till Super Moderator Staff Member ISPConfig Developer

    So, when you log in with an ssh user, e.g. c2myuser. and this user is shown in ISPConfig that it belongs to the site mydomain.tld. In which site do you arrive on the shell and are you able to access the web directory with that user?
     
  2. axxies

    axxies Member

    Well, there is some sort of issue because even after I have logged in I am not allowed to access the directory that I should be able to access, that is ../../web

    web22@bs01:~$ cd ../../web
    web22@bs01:/var/www/clients/client1/web21/web$ ls -al
    ls: cannot open directory '.': Permission denied
    web22@bs01:/var/www/clients/client1/web21/web$ whoami
    web22
    web22@bs01:/var/www/clients/client1/web21/web$


    The site is at:

    /var/www/clients/client1/web21
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, but you did not use the username web22 for login as all web* usernames are not made for that, you used an SSH user that you created in ISPConfig like c2xxxx ?
     
  4. axxies

    axxies Member

    I used the c2sxxxxxx user to login.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    May you please take a look int the shell_user table in the ispconfig database, which puser and pgroup does the c2xxxxx user has there? Is it the same user and group that the website that he belongs to (table web_domain) in the system_user and system_group fields?
     
  6. axxies

    axxies Member

    ********* Please note - THIS specific comment is not from the new server, it's the OLD server **********

    I just checked the old server, but if I understand you correctly it's not relevant. On that site, when logging in to the account, I get this:

    web22@h0000:~$ pwd
    /var/www/clients/client2/web22/home/c2sxxxxxx
    web22@h0000:~$ whoami
    web22
    web22@h0000:~$
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    When the data in the database is correct on the new system (matching users n the fields that I described), then the script I wrote fixed the issue in ISPConfig db but the system failed to do the correction in the passwd file.
     
  8. axxies

    axxies Member

    http://imgur.com/a/kNtX7
     
  9. axxies

    axxies Member

    root@bs01 /var/www/TheDomain # cat /etc/passwd | grep xxxxxx
    c2sxxxxxx:x:5025:5006::/var/www/clients/client1/web21/home/c2sxxxxxx:/bin/bash
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so the user details in the database are correct, but not in the passwd file. How many website SSH users are on the system approx?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    The uid 5025 is the one from web22 and not web21, I guess?
     
  12. axxies

    axxies Member

    Hmmm... I don't see a table webdomain in the ispconfig database


    [EDIT: My bad. It is there]
     
    Last edited: Aug 10, 2017
  13. axxies

    axxies Member

    Not that many. So it's easy to re-create them. A rough guess 30 perhaps.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    In that case, I recommend to delete the current users and recreate them, as you would have to set the password anyway. The alternative would have been that I write a script that drops the user and recreates them, but I'm not 100% sure that it will work like that and the password would have to be set again manually anyway.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    The database has a lot of tables, when you looked in phpmyadmin, then the table is on the second page of the left manual.
     
    axxies likes this.
  16. axxies

    axxies Member

    Yes, this works.

    Does this mean that there is an error in the Migration Tool? I am about to migrate another server too within a couple of weeks.
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    There was an error in the migration tool which has been fixed in the version that has been released today. Just download the latest version trough your download link from sendowl.
     
    axxies likes this.

Share This Page