icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old November 14th, 2005, 8:55 PM   #1 (permalink)
Surpass Fan
Super #1
 
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
I guess this goes here? (FTP stuff)

Okay, so I know there are the files for .htpasswd and within .ncftp/ there is a file that gives each user's root directory and whatnot. However, I can not find the file which gives the hashes of the FTP passwords. Is that accessible by me (shared account)? Can I make it accessible by me?

Basically, I'm trying to accomplish a cron which will reset the password to a random string every X hours. Hashing the password and whatnot is not a problem; I just need a way to automate the password setting. Any thoughts?
__________________
- Evan Charlton | [site] | Server - SH58
Kickersny.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 14th, 2005, 8:57 PM   #2 (permalink)
SurPerson
On a golden path...
 
TJ09's Avatar
 
Joined in Jul 2004
Lives in front of my laptop
Hosted on Sync
437 posts
Gave thanks: 0
Thanked 1 Time in 1 Post
I'm going to assume FTP users are system users with only access to FTP, meaning they'd be in the server password file.

You could access CPanel via PHP and do it like that, though.
__________________
Me: TeeJay
Server: Sync (Statistics)
Site: technoized.com (Statistics)

chown -R us ./base
TJ09 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 14th, 2005, 9:01 PM   #3 (permalink)
Surpass Fan
Super #1
 
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
Well, I'm writing a Java application which will allow the FTP of files (so I can show a progress bar and whatnot). Obviously, I need a username and password. However, due to Java decompilers and whatnot, I can't have the password hard-coded into the app, so it will poll the server when it's setting up the FTP connection to get the password. I figure by randomly resetting it once every X hours (1, 2?), it'll keep it _reasonably_ secure.

Make sense? I might do it through cPanel/PHP, but that seems kinda roundabout.
__________________
- Evan Charlton | [site] | Server - SH58
Kickersny.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 15th, 2005, 10:16 AM   #4 (permalink)
Surpass Fan
Super #1
 
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
Okay, here's another one for you: is it possible to assign a certain FTP user only write privileges?
__________________
- Evan Charlton | [site] | Server - SH58
Kickersny.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 15th, 2005, 11:33 PM   #5 (permalink)
Surpass Fan
On a golden path...
 
Joined in Nov 2003
432 posts
Gave thanks: 0
Thanked 0 times
To change using PHP:
Quote:
$ftppwd="http://$ownername:$reseller_pass$host:2082/frontend/$cpmod/ftp/dopasswdftp.html?acct=$username&password=$password ";
($fp = fopen($ftppwd, "r")) or die("Could not open file!");
if(!$fp){
echo "Error: Did not change password";
}
Quote:
I'm going to assume FTP users are system users with only access to FTP, meaning they'd be in the server password file.
Actually they're virtual users.
__________________
Fw Web Solutions
http://fwwebs.com
fwwebs5 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On