LinuxQuestions.org
Visit Jeremy's Blog.
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 03-17-2011, 08:43 AM   #1
giusepped
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Rep: Reputation: 0
Unabel to switch user shell


I have a big problem here.
I have 2 shell windows, which I did not touched from yesterday.
One is a root shell and the other with some user account.
If I change the root password in the root shell window as

passwd root

I can change it, but when I go into the user shell window, and I do "su" I cannot switch to root. Always "incorrect password".
Same happen if I try to do "su <some-other-user>"
This happen ONLY in shell windowws. If I try, for example, to run some administration service, like system-config-service, the root password is accepted in the prompting window.

What the hell is happening here?
Please help.

Last edited by giusepped; 03-17-2011 at 08:45 AM.
 
Old 03-17-2011, 09:09 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
What distro is this ?????

Try su'ing, then looking at the end of /var/log/auth.log (Debian-based distros) or /var/log/secure (RedHat-based distros) for clues.
 
Old 03-17-2011, 09:31 AM   #3
giusepped
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
My distro is Fedora 12.
In secure I can see only this strange error.

Mar 17 14:23:30 localhost passwd: pam_unix(passwd:chauthtok): password changed for root
Mar 17 14:23:30 localhost passwd: gkr-pam: couldn't update the 'login' keyring password: no old password was entered

The problem is that I can't switch to any other user!
 
Old 03-17-2011, 11:20 AM   #4
giusepped
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Worse

I modified some file and the problem got worse.
I rebooted and the Login Screen doesn't show anymore the users list!
But if I ssh from another PC, I can enter.
Help
 
Old 03-17-2011, 12:14 PM   #5
giusepped
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
I summarized.
1) In a shell, if I try to switch to another user or root, always get incorrect password
2) But, from a shell, if I run system-config-users, the system prompt for the root password and it is accepted.

It seems that only shell programs (su, ssh, and so on) are unable to accept the password. Why?
G
 
Old 03-17-2011, 02:08 PM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Remember that the kernel references open files by iblock, not name, so, when you change a file, the changed contents are not "visible" to a process that has that file open. (That's the "magic" that let's you update a program without rebooting.) In your case, you changed /etc/password, but the changes will not be "implemented" until the kernel reopens the password file.

Try opening a new terminal window and seeing if it accessed the new password file. You might need to reboot. (I'm not sure exactly where nor when the password file is accessed, and what role is played by the shadow password file.)
 
1 members found this post helpful.
Old 03-17-2011, 02:32 PM   #7
giusepped
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by PTrenholme View Post
Remember that the kernel references open files by iblock, not name, so, when you change a file, the changed contents are not "visible" to a process that has that file open. (That's the "magic" that let's you update a program without rebooting.) In your case, you changed /etc/password, but the changes will not be "implemented" until the kernel reopens the password file.

Try opening a new terminal window and seeing if it accessed the new password file. You might need to reboot. (I'm not sure exactly where nor when the password file is accessed, and what role is played by the shadow password file.)
I rebooted a lot of time. With no success.
I can use su only by sudo (after I put my username in the adm group. To this I logged by REAL terminal, not emulation)
G
 
  


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
switch user using shell program. av.dubey Linux - Newbie 11 07-11-2008 11:06 PM
How to switch user via shell script cool_anupam Linux - General 7 05-29-2008 11:01 PM
How to switch user in shell scripting.. Parished.D Linux - Software 2 10-31-2006 08:30 AM
Unabel to install NdisWrapper on FedoraC5 Plantmiester Linux - Newbie 1 09-19-2006 04:57 AM
unabel to browser network puru_09 Linux - Networking 3 07-15-2002 10:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:33 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