• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2804
  • Last Modified:

Root password not working in terminal.

I'm using Linux CentOS.  I am unable to login in to root (su) when in a terminal.  When I go and do any administrative tasks in linux 'windows' environment my root password works fine.  For instance, I can change the root password vi a Applications->System Settings->Root Password.  After that niether the old password nor the new password work in the terminal.  The new root password is accepted for other root tasks that are not done inside the terminal, btw.  
0
HyperBPP
Asked:
HyperBPP
  • 5
  • 4
  • 3
1 Solution
 
arrkerr1024Commented:
Check your /etc/pam.d/su and see if it requires you to be in the "wheel" group to su, or just try putting yourself in wheel and see if you can then su.

Neither CentOS 4 or 5 require you to be in any specific group to run "su".
0
 
arrkerr1024Commented:
What I mean to say is that neither CentOS 4 or 5 require you to be in any specific group to "su" BY DEFAULT, sys admins frequently restrict this after installing.
0
 
HyperBPPAuthor Commented:
That doesn't appear to be the case.  Also, I've never had to be in the wheel group before.  I've used su in the terminal to login to root succesfully as the same user I am now, however, it just stopped working suddenly.  I am the only user/administrator on the machine as well.  
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
arrkerr1024Commented:
In the terminal, when you run su, does it prompt for the password?  If yes, when you type it in does it say anything like "su: incorrect password"?
0
 
HyperBPPAuthor Commented:
Yes
0
 
Kerem ERSOYPresidentCommented:
Ok lets get the things clear first:
- Do you just login from the console using non-root account ?
- Then you want to run "su -" in a terminal windows but ti refuses to run root shell ?
- But still you can change the password of root while you're logged on non root user ?

Will you please describe your set-up in more detail? Moreover when you are denied root access you must have some information in your /var/log/access


0
 
HyperBPPAuthor Commented:
I can login from the console as either root or a non-root user.  When I am logged in as root, everything seems to work properly.  However, when I am logged in as the non-root user I am unable to get into the root shell.  It rejects the root password I used, only moments before, to login as root.  It is as described in the fourth post: it displays su:incorrect password.  I can indeed perform root actions outside the terminal such as changing the root password or editing users and groups.  

To answer your last question, I do not seem to have a /var/log/access file before or after an attempt at logging into the root through the terminal.  
0
 
Kerem ERSOYPresidentCommented:
What I don't understand is how can you perform root actions in a non-root user's login screen without using su?
- Are you using a text or GUI console ?
- Please check your /var/log relative files : audit.log, messages and secure. You can display last lines with a command like:
tail /var/log/audit.log (or /var/log/messages , /var/log/secure)
0
 
HyperBPPAuthor Commented:
Sorry, I wasn't being very clear.  I can succesfully use the GUI console to perform root actions, but not the text or terminal console.  And this is when I try using the su command.

What should I be looking for in the var and log files?

Thanks
0
 
Kerem ERSOYPresidentCommented:
Ok let me explain what I understand:
- You get a succesful root login through GUI console
- You get a successfull non-root login through GUI
- When you logged-in as a non-root user and when you execute "su -" through an xterm launched from non-root login you get this "su: incorrect password"

If this is the case your audit.log and access must include some errors twhich is eventually causing your access being denied. Please post them here. If you logas are not important for you you might as well tuncate them before trying su so that you will know what is the latest output from them. To turncate your files please use these commnds:
# cd /var/log
# > access
# > messages
# > audit.log

then post the contents here.
0
 
HyperBPPAuthor Commented:
I don't have the files access and audit.log in my /var/log directory.  Here is what my message file displays after I make an attempt.

Oct 15 10:09:34 mm149212-pc last message repeated 13 times
Oct 15 10:10:39 mm149212-pc last message repeated 13 times
Oct 15 10:10:40 mm149212-pc su(pam_unix)[23683]: authentication failure; logname=office uid=500 euid=500 tty=pts/1 ruser=office rhost=  user=root
Oct 15 10:10:44 mm149212-pc pam_timestamp_check: pam_timestamp: `/var/' permissions are lax
0
 
Kerem ERSOYPresidentCommented:
ok just create them using the commands above and etss see if they are filled by syslog. Try to restart syslog after you create files (> messages will create an empty file if there's no such a file)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now