LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-08-2012, 03:44 AM   #1
ssaqib
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Rep: Reputation: 0
Location of Sudo in Centos


Hi, I am setting up a Centos server and after going through the basic hardening process I realised there is no 'sudo' package on the box. The system is completely locked down so I can't access the internet and since it is in a remote location I cannot get the package off the media. The only option I have is to somehow lift the sudo files off an existing server and move across.

Is this possible? where are the files located that I need to move and does anyone have instructions that I could follow?

Thanks.
 
Old 11-08-2012, 04:10 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,294

Rep: Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358
Seriously, get someone local to the machine to get it off the media, its going to be soooo much easier
 
Old 11-08-2012, 04:12 AM   #3
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,695
Blog Entries: 23

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
The only option I have is to somehow lift the sudo files off an existing server and move across.
Not advisable...the installed package - as with any other package by the way - has a conf file that is tuned in to the local platform, very rarely is a copy-n-paste of a package possible, and even then, a tweak of the conf file imposes itself.

If you dont have any access from the outside (root wise that is) the only option is to gain physical access to the box and installing sudo there.

As a humble word of advice: test this kind of installs on a physically accessible box (the LAN for example) before rolling out...

By the way, to locate anything (well, most of the stuff anyway) use "which" - like so:

Quote:
which sudo
that should give you the location of the executable, not the sattelite files as such (conf file, drivers, shared libs, stuff)...

Good luck

Thor
 
Old 11-08-2012, 05:19 AM   #4
ssaqib
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the quick replies.

Quote:
Seriously, get someone local to the machine to get it off the media, its going to be soooo much easier
This is impossible I am afraid. The only close-to-physical-access I can get to the box is via ILO. Server is in a different geographical location

@Thor - Did the exact same setup on other servers and I am clueless why this particular sever had packages missed out, probably an oversight.

(I am reluctant to use this option but ...) I could use an RPM couldn't I? I know I will probably need dozens of dependencies

Another option would be to get the media into a virtual drive and load is via ILO. The difficulty is how do I get yum to look at the media and list the packages allowing me to add the one I need.

Thanks.
 
Old 11-08-2012, 05:24 AM   #5
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,695
Blog Entries: 23

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
I could use an RPM couldn't I? I know I will probably need dozens of dependencies
As far as installing goes on RedHat's (and derived systems) - this is the best way to do it. Packages need dependencies, the very word stated the need therefore so if you could use an RPM, that's the way to do this...

Quote:
Did the exact same setup on other servers and I am clueless why this particular sever had packages missed out, probably an oversight.
Heh, happens to the best of us...

Thor
 
Old 11-08-2012, 05:37 AM   #6
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,718

Rep: Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906
sudo isnt installed by default in CentOS.

You should be able to su then install sudo if you really want it.

Last edited by cascade9; 11-08-2012 at 06:14 AM. Reason: ytpo...typo!
 
1 members found this post helpful.
Old 11-08-2012, 06:43 AM   #7
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,806
Blog Entries: 11

Rep: Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104
Quote:
Originally Posted by ssaqib View Post
Hi, I am setting up a Centos server and after going through the basic hardening process I realised there is no 'sudo' package on the box. The system is completely locked down....
These statements don't necessarily imply that you have either hardened or setup this host.

Note: Install sudo before "hardening"?
 
Old 11-08-2012, 10:38 AM   #8
ssaqib
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
As far as installing goes on RedHat's (and derived systems) - this is the best way to do it. Packages need dependencies, the very word stated the need therefore so if you could use an RPM, that's the way to do this...
Sorted! Thanks for all all the help and comments.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sudo in CentOS 6.2 Linux_Kidd Red Hat 3 05-05-2012 08:32 PM
LXer: Tutorial: Sudo on CentOS/Scientific Linux/RHEL LXer Syndicated Linux News 0 04-21-2012 12:12 AM
Sendmail bad mail location CentOS 5.5 ct_brooktrout Linux - Server 1 11-18-2010 12:40 PM
CentOS conf.d folder location? comptech520 Linux - General 1 05-05-2010 08:14 AM
Unable to Run sudo due to getresuid() Not Working on CentOS 3.1 Xyrael Linux - Security 14 02-06-2008 08:29 PM


All times are GMT -5. The time now is 09:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration