FTP usernames without @mysite.com on the end?

cronjob78

Member
Feb 24, 2004
14
0
151
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:

[email protected]

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?
 

cronjob78

Member
Feb 24, 2004
14
0
151
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.
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,983
159
368
SLC
cPanel Access Level
DataCenter Provider
I found kind of a solution.
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
 

odyon

Registered
Feb 17, 2005
3
0
151
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?
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,983
159
368
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
 

cronjob78

Member
Feb 24, 2004
14
0
151
dalem said:
but watchout cpanel will overwrite
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...
 
Last edited:

cronjob78

Member
Feb 24, 2004
14
0
151
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.
 

kdr

Registered
Aug 8, 2002
4
0
151
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