Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Nov 2005
    Posts
    13

    Default general question

    instead of giving my customers access to cpanel, is it possible to take 2 cpanel features and intergrate them into an admin area?

    www.domain.com/admin

    The 2 options i would like to intergrate into the admin area are: email & stats



    any ideas how i could achieve this please?

    Thanks
    Dave

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    You have the option of giving your clients access to the CPanel with email only. If you need to add more, then you have to create your own theme.
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  3. #3
    Member antodeepak's Avatar
    Join Date
    Jan 2005
    Location
    kerala, India
    Posts
    34

    Default Hi

    Hi buddy,

    You can make your clients view the webstats without login into the cpanel. You can configure it with the following steps.

    The following commands help to access the webalizer without login the Cpanel
    cd /home/username/www
    ln -s ../tmp/webalizer stats
    chown username.username stats
    cd ../tmp
    chmod 755 ./
    chmod 755 ./webalizer

    will allow domain.com/stats/ for viewing stats without logging in to cpanel

    But I am not much condident in answering the "email" qst as I didn't understand what you are asking for...

    Thanks & Regards,
    Anto
    Thanks & Regards, Anto Deepak, System Administrator

  4. #4
    Member
    Join Date
    May 2003
    Posts
    114

    Default

    have you tried using the feature manager? you can create groups of accounts and restrict which options show up inside their control panel....


    "The feature manager allows you to disable/enable features inside of each users cPanel. Once you build a feature list you should edit the package you wish to assign it to and add the feature list. "

    .

  5. #5
    Member
    Join Date
    Nov 2005
    Posts
    13

    Default

    Many thanks for your replies!

    antodeepak has hit the nail on the head, i want to show my customers webstats without logging in to cpanel. so his resolution should take care of that.

    and for the email question i had, its the same question as the stats one.


    can i offer my customers the chance to add/remove email accounts without logging in to cpanel? via a seperate admin (e.g: is there a script or something that will connect to cpanel [using a configure.php or something] and then allow customers to add/remove email accounts / forwarders)

    is it the same sort of method as the stats method?



    p.s: i have created a complex admin area for my customers, using php/SQL, and have been developing it for a year now, the last thing to add to it is email function and web stats. Thats why i dont want to use cpanel.
    Last edited by davestacey; 11-12-2005 at 09:22 AM.

  6. #6
    Member antodeepak's Avatar
    Join Date
    Jan 2005
    Location
    kerala, India
    Posts
    34

    Default :) Hi,

    Hi buddy,

    Seems that we can work out the issue with email. But Have to investigate a further for that. You can wirte a script that helps for adding a pop account and can integrate it with the php/sql script. But there will be a issue. You have to particularly assign the quota for email accounts with the script. Hope you got me. Please try to check out with writing a script. If you get any thread with that, please update with the posting. So that It will be helpful everybody.

    Thanks for your care and support.

    Anto
    Last edited by antodeepak; 11-13-2005 at 10:04 PM.
    Thanks & Regards, Anto Deepak, System Administrator

  7. #7
    Member dave9000's Avatar
    Join Date
    Apr 2003
    Location
    arkansas
    Posts
    891
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    i have a script that manages cpanel mail accounts and quotas using a database table and php web pages

    its a rough script but it works for what i need
    I run it on a cronjob and it removes and rewrites the auth files for the e-mail accounts on a set schedule

    #!/usr/bin/perl

    use DBI;
    use Crypt:ES;

    my $dbh = DBI->connect("DBI:mysql:database:<hostname>", "dbuser", "dbpassword");

    my $passwd="/home/<accountname>/etc/<domainname>/passwd";
    my $shadow="/home/<accountname>/etc/<domainname>/shadow";
    my $quota="/home/<accountname>/etc/<domainname>/quota";

    sub encrypt_password
    {
    my $unencrypted_string = shift @_;
    my @salt_chars = ('a'..'z','A'..'Z','0'..'9');
    my $salt = "\$1\$" . $salt_chars[rand(63)] . $salt_chars[rand(63)] . "\$";
    return crypt($unencrypted_string, $salt);
    }


    my $sql_email = <<ENDSQL;
    select email,password from database order by email
    ENDSQL
    my $sth_email = $dbh->prepare($sql_email);


    open(DAT,">$passwd") || die("Cannot Open File");
    close(DAT);
    open(DAT,">$shadow") || die("Cannot Open File");
    close(DAT);
    open(DAT,">$quota") || die("Cannot Open File");
    close(DAT);

    $sth_email->execute();
    while ($hash = $sth_email->fetchrow_hashref)
    {
    $email = $hash->{email};
    $pass = $hash->{password};
    my $crypt = &encrypt_password($pass);
    open(DAT,">>$passwd") || die("Cannot Open File");
    print DAT "${email}:x:32046:32047::/home/<accountname>/mail/<domainname>/${email}:/usr/local/cpanel/bin/noshell\n";
    close(DAT);

    open(DET,">>$shadow") || die("Cannot Open File");
    print DET "${email}:${crypt}:::::::\n";
    close(DET);

    open(DQT,">>$quota") || die("Cannot Open File");
    print DQT "${email}:10485760\n";
    close(DQT);
    }

    $dbh->disconnect;

    $cnt = chown 32046,12,'${passwd}','${shadow}','${quota}';
    chown $uid, $gid, @filenames;
    Dave Browning
    Intersite Technologies
    Greenbrier Ar
    dave@isitetech.com

  8. #8
    Member
    Join Date
    Aug 2004
    Posts
    19

    Default

    webignition wrote up a tutorial on how to write scripts for remote access. its pretty good and should fit the bill on how to setup functions in a seperate area(different controlpanel)

    help if i added the address lol

    http://forums.cpanel.net/showthread.php?t=46362

Similar Threads & Tags
Similar threads

  1. general question
    By xnfire in forum New User Questions
    Replies: 2
    Last Post: 10-08-2008, 02:52 AM
  2. General WHM Question
    By bradyb in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-14-2007, 04:13 PM
  3. General Statistics Question
    By hostserve in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-08-2007, 09:15 PM
  4. General cPanel Question
    By dennisgroup in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-15-2005, 08:27 AM
  5. General Question About IP address's
    By noimad1 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-02-2003, 10:03 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube