Change service name permanently

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Change service name permanently
# 1  
Old 09-25-2013
RedHat Change service name permanently

Hi,

Since everything is doable in Linux so far, what is the ability of changing a spicifc service name permanently. e.g. I want to change the network service name to connection, so I can use chkconfig command as follow:

Code:
chkconfig connection off --level 5

# for disabling network service in level 5..

and in the same time..

Code:
service connection restart

# that is for restarting network service.

Thanks
# 2  
Old 09-25-2013
One wonders why, but I suppose you could rename /etc/init.d/network to /etc/init.d/connection initially. Then you would need to search down /etc/rc.d for S*network. I get these:-
Code:
$ cd /etc/rc.d
ls -l *|grep network
lrwxrwxrwx. 1 root root 17 Dec  2  2012 K90network -> ../init.d/network
lrwxrwxrwx. 1 root root 17 Dec  2  2012 K90network -> ../init.d/network
lrwxrwxrwx. 1 root root 17 Dec  2  2012 S10network -> ../init.d/network
lrwxrwxrwx. 1 root root 17 Dec  2  2012 S10network -> ../init.d/network
lrwxrwxrwx. 1 root root 17 Dec  2  2012 S10network -> ../init.d/network
lrwxrwxrwx. 1 root root 17 Dec  2  2012 S10network -> ../init.d/network
lrwxrwxrwx. 1 root root 17 Dec  2  2012 K90network -> ../init.d/network

You would then have to delete/overwrite all these links to point them to ../init.d/connection instead.

I'm not sure I would want to take the risk of this. There is a chance that upgrades may want to adjust the /etc/init.d/network script and you could miss them and leave yourself very confused as to what's happened.

Can you really justify the effort against the risk just for a name change?




Robin
Liverpool/Blackburn
UK
# 3  
Old 09-25-2013
Creating a standard giving more secure to the servers. Picture this, if any hacker logged into my system and found all crazy names for the services, what will he gonna do!?
A lot of ideas in my mind, concerning secure the system working beside iptables and SELinux, I need to create a shield that can't be broken even by the people with high experience.

Hope I have been clear in this.
# 4  
Old 09-25-2013
iptables and SELinux offer real security. Security by obscurity doesn't.
These 2 Users Gave Thanks to Scott For This Post:
# 5  
Old 09-25-2013
Quote:
Originally Posted by leo_ultra_leo
Picture this, if any hacker logged into my system and found all crazy names for the services, what will he gonna do!?
Understand this: If he has the power to start and stop services, the battle is already lost. He could ignore them and install his own, rootkit you, replace everything, do whatever he wanted.
# 6  
Old 09-25-2013
Quote:
Originally Posted by Corona688
Understand this: If he has the power to start and stop services, the battle is already lost. He could ignore them and install his own, rootkit you, replace everything, do whatever he wanted.
Yes sir this is also under my consideration, I know it's kind of crazy, but let me try it. I want also to change the service command name, and the reboot command, and any other command could effect the system.

In other word, I want to keep the system as is, but in the same time I wanna give different names for the services and any command under /sbin directory.
I hope that everybody here understand my point, I do highly respect iptables and SELinux as a security systems for sure, but I want to add more security to the system, changing all the effective commands (and paths if availableSmilie ).

On the other hand, what if I want to run a special service in a specific time in my system and I don't want anybody knows what this service do (like monitoring service for bad users or admins), and I want in the same time change this service name to a misleading name, no one can discover this service, and that's why I want am alternative service instead of crond (see my other topic in this forum), to schedule this service in the dark Smilie. This is for sure should be done with filtering any log files that made by this.
The thing that I do believe with, is Linux doable, and can do it. Any suggestions and criticizes are most welcomed.

Last edited by leo_ultra_leo; 09-25-2013 at 10:44 PM..
# 7  
Old 09-25-2013
The point here is that you're not adding any security whatsoever by renaming services because a service's name has nothing whatsoever to do with security, and anyone who's already got unauthorised entry into your system is way ahead of you, and won't be there to look at your services!

SELinux has to do with protecting your system against attacks via services. Did you consider what impact your changes might have on that?

And if you rename reboot are you also going to rename halt and shutdown? No problem, I can still change runlevels using init. Or do you plan to rename that, too?

It seems to me that you're not focussing on security at all, but just on changing things because you can, and the cost of that is that you're probably making your system less secure as a result.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Solaris

Set autolist permanently

Hi , How to set autolist permanently in Solaris 10 (2 Replies)
Discussion started by: ankit.padhiyar
2 Replies

2. UNIX for Dummies Questions & Answers

change service order

hi guys I have a service that depends on some shares (NFS shares ) that need to be mounted before before the service start so the service-app finds the NFS shares and starts correctly... I am confused here this is what I found but I am not sure what to do in order to change it BTW is Suse... (2 Replies)
Discussion started by: karlochacon
2 Replies

3. UNIX for Advanced & Expert Users

gmail revert to old look permanently

I thought I would share gmail revert to old look permanently. I am sure I am not the only one annoyed by the new look. Install Stylish extension Choose the Stylish UserStyle that you want. I know The Return of Old Gmail and gmail-b2b both work but I prefer gmail-b2b since I think it looks... (0 Replies)
Discussion started by: cokedude
0 Replies

4. Solaris

delete routing permanently

How can I remove permanently a route from the routing table? I have the following: root@aiwutr1>netstat -rnv IRE Table: IPv4 Destination Mask Gateway Device Mxfrg Rtt Ref Flg Out In/Fwd -------------------- --------------- --------------------... (3 Replies)
Discussion started by: gianluca.p
3 Replies

5. Shell Programming and Scripting

Find and replace permanently

i have a few scripts in which i need to find string"ali1@abcd.com" and replace it with "ali@abcd.com" i used 2 below commands but none of them is permanently replacing the old string in the script s.sh perl -pi -e 's/ali1@abcd.com/ali@abcd.com/g' s.sh sed 's/ali1@abcd.com/ali@abcd.com/g'... (7 Replies)
Discussion started by: ali560045
7 Replies

6. UNIX for Dummies Questions & Answers

Change IP permanently without Yast?

Folks; i have a SUSE 10 box and i need to change the IP/GW & Netmask on it but without Yast tool. Which files/services needed to be edited or restarted to make it happen? Thanks in advance (1 Reply)
Discussion started by: Katkota
1 Replies

7. Slackware

permanently change KDE DPI

I know this has been asked before but everything I have found on the subject either does not apply or does not work. I am trying to set my DPI under KDE in slackware 12.1 to 75. startx -- -dpi 75 works fine as expected. I have an intel video card. this is my xorg.conf: Section "ServerLayout"... (1 Reply)
Discussion started by: raidzero
1 Replies
Login or Register to Ask a Question