LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-08-2009, 07:59 AM   #1
ytd
Member
 
Registered: Jan 2009
Posts: 205

Rep: Reputation: 31
Putty logs me out / Putty throws me out after I log in


I have copyed the users from an old linux machine to a new linux machine, after I did that I couldn't log in with putty with any user except root. I looked in /etc/passwd and all seems to be fine, no duplicate users. I did this before and it worked. Let me say that again, I did this before 2 months ago and it worked fine, now I have used the same commands, export UGI limit 500 blablaba, and export the users with awk. I can log in with root but if I want to log in with any other users of the system I can't. I have updated a password of a user and putty still throws me out. I have created a new user tried to log with it but still putty throws me out. Is there a log somewhere that can tell me why does putty throws me out ? Or something liek that ?! Did this ever happend to you guys ?
 
Old 08-08-2009, 08:04 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
You have provided no information that would help us help you. What error messages does putty give you? It's probably not PuTTY's fault. What error messages are in the server's log?? Look in /var/log/secure or /var/log/auth.log or /var/log/messages or /var/log/syslog (you don't even mention what kind of Linux you're running). Please also read the link in my sig before asking future questions.
 
Old 08-08-2009, 08:06 AM   #3
ytd
Member
 
Registered: Jan 2009
Posts: 205

Original Poster
Rep: Reputation: 31
I tried to log with a user with winscp and the error is:


server to refuse to start a shell command
 
Old 08-08-2009, 08:18 AM   #4
ytd
Member
 
Registered: Jan 2009
Posts: 205

Original Poster
Rep: Reputation: 31
when I tried to enter with winscp I get in /var/log/secure that user not known for the underlying autentification mode but if i try to log in with the with putty i see that in /var/lo/gsecure sesion is oped for user xx and then sesion closed for user xxx

Should I go modify the pam.d or etc/map or something

pls advice
 
Old 08-08-2009, 08:22 AM   #5
ytd
Member
 
Registered: Jan 2009
Posts: 205

Original Poster
Rep: Reputation: 31
Hmmm I think I know what it is, I have copyed from the old linux machine the shadow thing too, I think that's the problem. Should I delete it ?
 
Old 08-08-2009, 08:39 AM   #6
ytd
Member
 
Registered: Jan 2009
Posts: 205

Original Poster
Rep: Reputation: 31
I am using CentOS 5 FInal X86_64
there are no information in those logs, it ends one month ago or so. The system didn't write aything there.
 
Old 08-08-2009, 08:46 AM   #7
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
copying /etc/shadow should be fine unless you copied it from a 32-bit system to this 64-bit system. Try adding a user with the useradd/adduser command, give it a password, and see if that works.
 
Old 08-08-2009, 09:05 AM   #8
ytd
Member
 
Registered: Jan 2009
Posts: 205

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by AlucardZero View Post
copying /etc/shadow should be fine unless you copied it from a 32-bit system to this 64-bit system. Try adding a user with the useradd/adduser command, give it a password, and see if that works.
I think it's probably 32 bits the old system, i'm not sure but I think it is. And I think that the first time when I copyed the users, I haven't copyed the shadow thing. Once again, I am not sure, but I think I didn'y copy the shadow from the old linux to the new one.

So, let's say this is the problem, is it a problem if I delete the shadow, would that be a problem ? Because I want to try like this.

And yes, I did crate an user with useradd command and then passwd thatuser and I tried to enter with it in putty but it throws me out.

At PAM Autentification at login Local or remote login at Authentication steps I have: include service system-auth
and at account verification steps I have :

PAM module Description Failure level Parameters Move
pam_nologin.so /etc/nologin file check Required

copyed that from webmin
 
Old 08-08-2009, 09:14 AM   #9
ytd
Member
 
Registered: Jan 2009
Posts: 205

Original Poster
Rep: Reputation: 31
Oh, and I did some cron jobs in crontab, and I have this logs, you think it is a problem ?



Aug 8 14:13:26 herculetest crontab[7443]: (root) BEGIN EDIT (root)
Aug 8 14:14:19 herculetest crontab[7447]: (root) BEGIN EDIT (root)
Aug 8 14:14:42 herculetest crontab[7450]: (root) BEGIN EDIT (root)
Aug 8 14:14:57 herculetest crontab[7452]: (root) BEGIN EDIT (root)
Aug 8 14:19:01 herculetest crond[4954]: (root) RELOAD (cron/root)
Aug 8 14:19:01 herculetest crond[4954]: (dsdsds) ORPHAN (no passwd entry)
Aug 8 15:01:01 herculetest crond[7831]: (root) CMD (run-parts /etc/cron.hourly)
Aug 8 15:12:59 herculetest crond[5001]: (CRON) STARTUP (V5.0)
Aug 8 15:13:00 herculetest anacron[5043]: Anacron 2.3 started on 2009-08-08
Aug 8 15:13:00 herculetest anacron[5043]: Normal exit (0 jobs run)
Aug 8 15:29:07 herculetest crond[4999]: (CRON) STARTUP (V5.0)
Aug 8 15:29:08 herculetest anacron[5041]: Anacron 2.3 started on 2009-08-08
Aug 8 15:29:08 herculetest anacron[5041]: Normal exit (0 jobs run)
Aug 8 15:43:25 herculetest crond[4993]: (CRON) STARTUP (V5.0)
Aug 8 15:43:26 herculetest anacron[5035]: Anacron 2.3 started on 2009-08-08
Aug 8 15:43:26 herculetest anacron[5035]: Normal exit (0 jobs run)
Aug 8 16:01:01 herculetest crond[6047]: CRON (*system*) ERROR:Could not set exec context to user_u:system_
r:unconfined_t for user, but SELinux in permissive mode, continuing
Aug 8 16:01:01 herculetest crond[6048]: (root) CMD (run-parts /etc/cron.hourly)
Aug 8 16:35:39 herculetest crond[5011]: (CRON) STARTUP (V5.0)
Aug 8 16:35:39 herculetest anacron[5053]: Anacron 2.3 started on 2009-08-08
Aug 8 16:35:39 herculetest anacron[5053]: Normal exit (0 jobs run)
Aug 8 17:01:01 herculetest crond[6371]: CRON (*system*) ERROR:Could not set exec context to user_u:system_
r:unconfined_t for user, but SELinux in permissive mode, continuing
Aug 8 17:01:01 herculetest crond[6372]: (root) CMD (run-parts /etc/cron.hourly)
Aug 8 17:04:51 herculetest crontab[6417]: (root) LIST (root)
Aug 8 17:04:57 herculetest crontab[6418]: (root) LIST (root)
[root@herculetest log]#
[root@herculetest]#
 
Old 08-08-2009, 10:07 AM   #10
ytd
Member
 
Registered: Jan 2009
Posts: 205

Original Poster
Rep: Reputation: 31
I have removed pam with : "yum remove pam" command, I didn't realise what I was doing. Now the server dosen't even have ssh, dosen't have nothing on it. I can't install anything, yum dosen't work. What should I do ?

After I removed the pam with yum remove pam I tried to log in with the informix user or any other system user and it worked but now I have this huge problem, I don't have nothing installed on the server. My question is, how do I install ssh and how do I make the yum command to work ?

pls answer asap pls
 
Old 08-08-2009, 10:17 AM   #11
ytd
Member
 
Registered: Jan 2009
Posts: 205

Original Poster
Rep: Reputation: 31
It had deleted all the services.

At the root prompt if I service sshd start it tells me that: unrecognized service

I can't do anything now...
What should I do ? Should I try to install the server again ? I already triued with upgrade, and it installed many things but still yum and sshd dosen't work. Should I install the server typically ? But I am afraid that I will lose everything.

pls answer asap with any ideea
 
Old 08-08-2009, 10:20 AM   #12
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Reinstall.
 
Old 08-08-2009, 10:27 AM   #13
ytd
Member
 
Registered: Jan 2009
Posts: 205

Original Poster
Rep: Reputation: 31
I have a work directory there and it is crucial for me to lose it. Will I lose it if I reinstall ?

the folder is in / and it's called kit

will the reinstall erase that directory ?

Wait a minute, I tried to reinstall it but I have the same problem, now I am talking about the install (new install).
 
Old 08-08-2009, 11:54 AM   #14
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Back your data up.
 
Old 08-09-2009, 01:18 AM   #15
ytd
Member
 
Registered: Jan 2009
Posts: 205

Original Poster
Rep: Reputation: 31
Couldn't save the data... I was forced to install the linux on the other hdd in order to save the data... tooked 2 hourrs to do that. The problem of all this was that I wasn't able to log in with any user(s) exxcept root which was working. I removed the pam like one guy told me (he said reinstall) and after I did that nothing was working.

Anyway, I have a clean install now, got the webmin, installed it, and I can't enter in the webmin itnerface, why ?

http://www.webmin.com/rpm.html

rpm -U webmin-1.480-1.noarch.rpm
it installed and after I tried to log in using https://localhost:10000 and http://localhost:10000 both didn't work. Ofc, I changed the localhost with the IP or the server 'cause I accesed it via windows machine. I did use /etc/init.d/webmin restart /start etc the service was restarted, I was checking it with status then and it tells me that it works but I can't login. Why ?

install perl5 libnet-ssleay-perl I have installed them too.

Oh, and one more thing, after I installed (clean install) the CentOS 5 I didn't install any package. Shold I have other packages installed in order for the webmin to work besides perl5 and libnet-ssleay-perl ?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Log in problem from Putty Client drpaudel Linux - Newbie 2 11-16-2008 01:59 PM
Putty? your_shadow03 Linux - Newbie 3 08-20-2008 11:24 AM
putty micro_xii Linux - Newbie 4 10-27-2006 10:59 PM
Re: Putty unixfreak Linux - Newbie 6 09-01-2004 11:42 AM
Other than putty KaktusKnight Linux - General 4 05-07-2003 01:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:44 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
Open Source Consulting | Domain Registration