Solved

Need help with a Linux user login problem

Posted on 2013-05-17
8
402 Views
Last Modified: 2013-05-20
Hi,

I am setting up a server and testing NIS from a client computer. The server is Redhat Enterprise and the client computer is Ubuntu.

I have a local user (Mark) and an NIS user (Tim) setup on the client computer. When the client computer boots up, I can select Mark or Tim to login to the client computer. Mark logs in locally without issues, but Tim looks like it is going to and then takes me back to the login screen. If I enter the wrong password, then it tells me that so it's not an authentication issue.

If I login as Mark, open a Terminal and switch user to Tim, then Tim can login.

What is causing the Tim account to only be able to login via the Terminal?

Thanks,
Mark
0
Comment
Question by:Mccalma1
  • 4
  • 4
8 Comments
 
LVL 39

Expert Comment

by:noci
ID: 39176971
Most probably just a timeout. The NIS response needs to back within 30 seconds to be accepted.

Are all settings done corectly, forward DNS lookup, reverse lookup is important too as a hostname is requested for logging purposes.
0
 

Author Comment

by:Mccalma1
ID: 39177212
I'm getting answers when I perform an nslookup from the client (see below). I don't understand why nslookup works with main (server hostname), but "dig -q main" doesn't give an answer. Also, where is the timeout settting/config file that you are referring to?


root@ubuntu:/etc# nslookup
> main.simnet.net
Server:            137.244.226.231
Address:      137.244.226.231#53

Name:      main.simnet.net
Address: 137.244.226.231
> main
Server:            137.244.226.231
Address:      137.244.226.231#53

Name:      main.simnet.net
Address: 137.244.226.231
> 137.244.226.231
Server:            137.244.226.231
Address:      137.244.226.231#53

231.226.244.137.in-addr.arpa      name = main.simnet.net.
> fallback
Server:            137.244.226.231
Address:      137.244.226.231#53

Name:      fallback.simnet.net
Address: 137.244.226.232
> 137.244.226.232
Server:            137.244.226.231
Address:      137.244.226.231#53

232.226.244.137.in-addr.arpa      name = fallback.simnet.net.
> exit

root@ubuntu:/etc# dig -x 137.244.226.231

; <<>> DiG 9.8.1-P1 <<>> -x 137.244.226.231
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40348
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;231.226.244.137.in-addr.arpa.      IN      PTR

;; ANSWER SECTION:
231.226.244.137.in-addr.arpa. 604800 IN      PTR      main.simnet.net.

;; AUTHORITY SECTION:
226.244.137.in-addr.arpa. 604800 IN      NS      main.simnet.net.

;; ADDITIONAL SECTION:
main.simnet.net.      38400      IN      A      137.244.226.231

;; Query time: 1 msec
;; SERVER: 137.244.226.231#53(137.244.226.231)
;; WHEN: Fri May 17 14:10:21 2013
;; MSG SIZE  rcvd: 105

root@ubuntu:/etc# dig -q main.simnet.net

; <<>> DiG 9.8.1-P1 <<>> -q main.simnet.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14563
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;main.simnet.net.            IN      A

;; ANSWER SECTION:
main.simnet.net.      38400      IN      A      137.244.226.231

;; AUTHORITY SECTION:
simnet.net.            38400      IN      NS      main.simnet.net.

;; Query time: 2 msec
;; SERVER: 137.244.226.231#53(137.244.226.231)
;; WHEN: Fri May 17 14:10:32 2013
;; MSG SIZE  rcvd: 63

root@ubuntu:/etc# dig -q main

; <<>> DiG 9.8.1-P1 <<>> -q main
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 61737
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;main.                        IN      A

;; Query time: 3 msec
;; SERVER: 137.244.226.231#53(137.244.226.231)
;; WHEN: Fri May 17 14:10:38 2013
;; MSG SIZE  rcvd: 22
0
 
LVL 39

Expert Comment

by:noci
ID: 39178218
nslookup also consults the /etc/hosts  - its a name lookup call.
- uses gethostbyname ()
dig only resolves using DNS. (It's a DNS query tool ).
- uses DNS query packets.

30 seconds is hardcoded in the pam layer afaict.
But to be honest 30 seconds is a pretty long time,
The network transaction should be done within a second or so.

So try to find out the network issue...
it can be a lot of things, auto config not working correctly packet loss, missing enties for reverse lookup's (PTR) in DNS.  servers running low on resources, disk too full...
server process to be started from xinetd in stead of running as daemon..?
0
 

Author Comment

by:Mccalma1
ID: 39180969
Thanks for the info regarding dig and nslookup, good stuff!!!

The server's hostname is "Main", the domain is simnet.net and the IP address is 137.244.226.231. NS lookup and dig appear to output good forward and reverse answers (reference my previous comment).

I can ping the server with no lost packets. My NFS mounts work as expected. If I'm in a terminal while logged in as a local user; I can "su" to to the NIS user without any issues. There is no hang up, it's immediate. I'm not convinced I have a network issue. I'm suspecting something is setup wrong in a config file, but have no idea where to look. Keep in mind that this server and client machine have never been in production. I'm setting it all up from scratch for my customer. Also, this is my first time setting up a server so I wouldn't be suprised if I setup the NIS user incorrectly on either the server or the client. I utilized webmin to setup the users and it seemed easy and straight forward.

I took a video of what it looks like when I try to login from the GUI. It's 67MB, so I'm not sure I will be able to upload it, but I'll try.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 39

Expert Comment

by:noci
ID: 39181175
what's in the /etc/nsswitch.conf file?
0
 

Author Comment

by:Mccalma1
ID: 39181191
Client:

passwd: nis compat
group:      nis compat
shadow:      nis compat

hosts: files dns
networks: files

protocols:      files
services:       files
ethers:         files
rpc:            files

netgroup:       nis



Server:

passwd:     files
shadow:     files
group:      files

hosts:      files dns
0
 
LVL 39

Accepted Solution

by:
noci earned 500 total points
ID: 39181313
do you have the connection entries in /etc/passwd + /etc group?

:+:::::   in /etc/passwd
:+::      in /etc/group
0
 

Author Closing Comment

by:Mccalma1
ID: 39182044
It looks like your + shift over to the right. Anyway, I do have that in my passwd and group file. I just figured out what the problem was. The Xwindows files such as .Xauthority did't getting created in the Tim User account. I copied the files from Mark to Tim and now the Tim account can login. Thank you for your help! This was driving me crazy.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Are you sitting there reading this and wondering how to get started with Linux? It almost seems like picking the right Linux distribution is about like picking the right college or buying a new car if you read some of the article out there. Relax… l…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now