homepage Welcome to WebmasterWorld Guest from 54.227.12.4
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
vps on linux with cpanel/whm admin newbie
vps on linux with cpanel/whm admin newbie
babushka




msg:3540684
 9:06 pm on Jan 4, 2008 (gmt 0)

Is this is a good forum for newbies to get info on linux admin? I am struggling with quite a few things.

My question right now is:

I had to recompile apache. Now my root login notification that was setup in bash_profile is gone. I used the info below from another site to set this up. Does recompiling apache delete the bash_profile all the time or did I do something wrong? Thanks!

Install a root breach DETECTOR and EMAIL WARNING
=========================================

If someone does happen to get root, be warned quickly by installing a detector and warning at your box. You will at least get the hackers/spammers ip address and be warned someone is in there.

Server e-mail everytime someone logs in as root

To have the server e-mail you everytime someone logs in as root, SSH into server and login as root.

At command prompt type:
pico .bash_profile

Scroll down to the end of the file and add the following line:

echo 'ALERT - Root Shell Access on:' `date` `who` ¦ mail -s "Alert: Root Access from `who ¦ awk '{print $6}'`" your@email.com

Save and exit.

 

babushka




msg:3540799
 11:51 pm on Jan 4, 2008 (gmt 0)

Hmm, so now I add it back and my root login emails aren't working.

Anyone with ideas?

babushka




msg:3540905
 5:02 am on Jan 5, 2008 (gmt 0)

Ok oddly enough, I created a new account for the domain whose email address I was using on the vps. The server ignored those emails even though the nameservers weren't changed yet.

I leave this here in case someone else does something like that.

jtara




msg:3543303
 5:37 pm on Jan 8, 2008 (gmt 0)

1. You shouldn't be compiling anything while logged-in as root! You will need to be root, though, to "make install" once a software packaged you have built is to be installed.

2. It's highly unlikely building or installing Apache did anything to your login script.

3. Cpanel, on the other hand, has among it's functions the ability to manage (create, delete) user accounts. I don't use CPanel (I use DirectAdmin) so I don't know the details. Did you add your user account to CPanel? If so, you can expect that it wrote what IT wants to write in the user's home directory.

That's one of the drawbacks of using a control panel - they often take real control away from you, and insist on doing things "their way".

babushka




msg:3544170
 5:29 pm on Jan 9, 2008 (gmt 0)

Thank you for your response. My computer died and I'm just now getting back online - and way behind on everything.

I didn't know I shouldn't be logged in as root when recompiling apache. I really must find a good book or manual on this stuff. I confess I am a nerd and really love this stuff but also very naive about 'nix stuff.

Maybe it is just me, but I find cpanel kind of kludgey(sp?) and buggy. I will look into switching to directadmin. Thanks,

jtara




msg:3544261
 6:54 pm on Jan 9, 2008 (gmt 0)

I didn't know I shouldn't be logged in as root when recompiling apache.

When you are logged-in as root, you have access to ALL files. You shouldn't be routinely logged-in as root - it's an extreme security risk.

It's best to always log-in as a normal user, and escalate your privileges as needed, using "su", "sudo", etc.

It's especially easy to avoid logging-in as root on a Linux GUI system, BTW - long before Vista, Linux desktop system configuration and management apps have permitted escalated privileges from a user account. (You are promoted for the root password.)

If you are doing something (such as compiling, editing files under your home directory, etc. etc.) that doesn't require root privileges, don't do it as root.

Maybe it is just me, but I find cpanel kind of kludgey(sp?) and buggy. I will look into switching to directadmin.

Uh, that's pretty close to my opinion of DirectAdmin, as well. I use it, reluctantly, because I get better support from my host if I use it. But I've had to learn how to work-around it's limitations. For example, I have to remember never to perform certain operations, so that it doesn't clobber my manually-edited Apache config files. (They give you the ability to add arbitrary options to certain sections of the config through the control panel, but not all.)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved