LinuxQuestions.org
Help answer threads with 0 replies.
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 09-28-2011, 09:44 PM   #1
acschnabel
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Rep: Reputation: Disabled
Given "sudo su" when asked for root password


I'm taking over a web server that was built on CentOS and I'm right now trying to get everything straight. I am NOT a linux person and will be looking for someone to manage that aspect of it once I am at that point.

The previous contracts who had the server are sending me just enough information to make me work to figure out the rest. I've got a password file for the server but it doesn't contain a root password. I asked them for the password and their guy responded with "sudo su".

So, what does that mean in terms of root access? I have a seperate account that I can log in with and get to everything but when the time comes that I need root access (installing SSL certificate SOON), am I going to be able to do so?

Thanks!
Tony.
 
Old 09-28-2011, 09:54 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,311

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
If the /etc/sudoers file has your normal user setup correctly, then that cmd will switch you into root user's acct.
http://linux.die.net/man/8/sudo
http://linux.die.net/man/5/sudoers
http://linux.die.net/man/8/visudo
http://linux.die.net/man/1/su

Try
Code:
sudo su

# then try
cat /etc/sudoers
to find out exactly what version you have, run these cmds
Code:
uname -a

cat /etc/*release*
NB: Linux IS case sensitive
HTH

Last edited by chrism01; 09-28-2011 at 09:55 PM.
 
Old 09-28-2011, 10:02 PM   #3
acschnabel
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Perfect, I sort of figured out that was the case, but your post shed a lot of light. sudoers file shows my account can run as root, so I'm good there.

Thanks for the help.
 
Old 09-28-2011, 10:13 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,311

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Using your version info as above (2nd cmd), see the relevant SysAdmin manual/HOWTO here http://www.linuxtopia.org/online_boo...ion_index.html
 
Old 09-28-2011, 10:17 PM   #5
bonixavier
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 320

Rep: Reputation: 62
Do some research and do some things too:
- remove other accounts from /etc/sudoers
- disable root ssh logins
- delete all user accounts no longer needed
- change the passwords of all users and root

That can save you some headaches.
 
Old 09-28-2011, 10:20 PM   #6
acschnabel
LQ Newbie
 
Registered: Sep 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
@bonixavier.. that's precisely what I was working on.

@Chris.. thanks for the link. I appreciate all the help I can get!
 
Old 09-28-2011, 10:56 PM   #7
snooly
Member
 
Registered: Sep 2011
Posts: 124

Rep: Reputation: Disabled
You might be better off using "sudo su -" rather than "sudo su". This will make sure that your root shell is using root's environment, rather than your user environment.

One difference would be that if you use "sudo su -", the root shell will use the dotfiles in /root instead of the dotfiles in /home/username.
 
Old 09-28-2011, 11:11 PM   #8
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,311

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
There's a good cli tutorial http://rute.2038bug.com/index.html.gz
 
  


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
"su - root" giving incorrect password but normal root login works. ?? arashi256 Linux - Newbie 10 06-03-2010 04:13 AM
"sudo rsync -avuzogqb --backup-dir" permissions lost to root Nudelsalat Linux - General 1 01-09-2010 01:33 PM
'sudo' cant list "/root/install*" ?? Komal_rg Linux - Newbie 6 10-29-2009 04:47 AM
echo "hahaha" | sudo tee /root/reallyimportantstuff crispyleif Linux - Security 7 01-24-2009 12:51 PM
sudo stopped working: "must be setuid root" quincy_the_penquin Linux - Software 4 04-30-2007 07:37 AM


All times are GMT -5. The time now is 06:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration