The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FTP usernames without @mysite.com on the end?

Discussion in 'General Discussion' started by cronjob78, Feb 17, 2005.

  1. cronjob78

    cronjob78 Member

    Joined:
    Feb 24, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I want to give FTP access to certain users to specific folders on my server to upload music.

    The users are not technically minded I'm providing links for them so they can FTP drag-and- drop style with IE.

    The name of my website is quite long. Certain versions of Internet Explorer (it seems) or possibly Windows won't allow a username greater than 31 characters:

    someuser@myverylongwebsitename.com

    This is a real pain.

    Besides root I have another username for FTP (I didn't set this up - it was set up for me when I arrived on the server) and I can enter that without the myverylongwebsite.com extention and all works fine.

    In cPanel I try to create a username without the @myverylongwebsite.com but it won't work.
    Can anyone suggest a solution? Can I create usernames in UNIX or in some file on the server instead?
     
  2. cronjob78

    cronjob78 Member

    Joined:
    Feb 24, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I found kind of a solution.

    You can just edit the passwd.vhosts file and delete the extra part of the user name.

    Does anyone know if you can stop the FTP manager in cPanel adding the extra bit?
    I'll be adding users regularly so this will be a pain in the ass.
     
  3. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    thats not kind a solution that is the solution

    thats the only why I have found that plays nice with IE with the @domainname.com

    but watchout cpanel will ovewrite
     
  4. odyon

    odyon Registered

    Joined:
    Feb 17, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    and what about the email login name. I realy don't like it everytime i have to type the complets mailaddress like you+mail.com Is there a way to login on f.e. Squirrelmail and he'll still recognizes it as a "+mail.com" username?
     
  5. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    this was a question about FTP not mail


    thats how cpanel keeps track of users otherwise you would confilcict with email users with the same username
     
  6. cronjob78

    cronjob78 Member

    Joined:
    Feb 24, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    yes, it does which is a nightmare. I hadn't anticipated that.

    Everytime I add a new ftp user I have to edit the file and delete all the @mydomain extensions it adds to each FTP username. As I add more users it I have mroe work to do.

    I have a few usernames (like root) that don't have the @mydomain extension but they were all created before cPanel was installed. How come cPanel doesn't add the extensions to those usernames also? They must be contained somewhere besides the passwd.vhosts file?
    Can I add FTP users at the shell maybe?

    Perhaps I'll write a unix script that removes the @mydomain.com part from the file but its messy...
     
    #6 cronjob78, Mar 14, 2005
    Last edited: Mar 14, 2005
  7. cronjob78

    cronjob78 Member

    Joined:
    Feb 24, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    This is my basic solution for a 2 line unix script which removes the instance of the domain name from the passwd.vhosts file.



    cp /etc/proftpd/passwd.vhosts /etc/proftpd/tempfile1

    (copies the file to a temporary file so you'll have a copy of the original)

    sed -e 's/@mylongdomainname.com//g' /etc/proftpd/tempfile1 > /etc/proftpd/passwd.vhosts

    (replaces all instances of @mylongdomainname.com in tempfile1 with nothing and puts the result back into passwd.vhosts). Note that tempfile1 will not be changed but the one you want will!

    Stuck it on as a cronjob and seems to be working ok. I run the script every time I use ftp manager in cpanel.

    hope this helps somebody somewhere in the future. Its wrecked me head for too long.
     
  8. kdr

    kdr Registered

    Joined:
    Aug 8, 2002
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I have an application that requires the ability to use the plain usernames for ftp. I have this working on another domain and couldn't figure out why I couldn't do this on the new domain I will be using. Then I realized that the reason for requiring the @domain.com part is to prevent getting ftp accounts on different virtual hosts mixed up. But, if I assign a dedicated IP address to a domain, I can use the simple ftp usernames without the @ part in that domain with the dedicated IP.

    Hope this helps someone,
    Karen
     
Loading...

Share This Page