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-16-2010, 11:23 AM   #1
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438
Blog Entries: 5

Rep: Reputation: 32
my username not in /etc/passwd


I have use of a remote server and I am able to log in and run commands.

However things are messed up because "id" only reports my user number and certain commands such as "whoami" don't return anything useful.

I looked at /etc/passwd (which should be world readable, correct me if wrong) and nor my username nor uid appears there.

This is weird, because I *can* log in. Surely if I'm not in /etc/passwd all access would be denied?
 
Old 03-16-2010, 11:34 AM   #2
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
That's weird, I had like this
24th line of 27 lines, has my name raju:x:1000:100:Mopidevi:/home/raju:/bin/bash
 
Old 03-16-2010, 11:36 AM   #3
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Depends, you don't necessarily have to use /etc/passwd. Does /etc/shadow exist?

Take a look at
Code:
man shadow
man pam
and associated for a better explanation than I can give
 
Old 03-16-2010, 11:43 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by stabu View Post
I have use of a remote server and I am able to log in and run commands.

However things are messed up because "id" only reports my user number and certain commands such as "whoami" don't return anything useful.

I looked at /etc/passwd (which should be world readable, correct me if wrong) and nor my username nor uid appears there.

This is weird, because I *can* log in. Surely if I'm not in /etc/passwd all access would be denied?
also check out /etc/nsswitch.conf (man nsswitch.conf)

this will tell you how/where you are being authenticated...ie ldap, nis, local files...etc etc
 
Old 03-16-2010, 11:49 AM   #5
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,969
Blog Entries: 1

Rep: Reputation: 208Reputation: 208Reputation: 208
Quote:
Originally Posted by stabu View Post
I have use of a remote server and I am able to log in and run commands.

However things are messed up because "id" only reports my user number and certain commands such as "whoami" don't return anything useful.

I looked at /etc/passwd (which should be world readable, correct me if wrong) and nor my username nor uid appears there.

This is weird, because I *can* log in. Surely if I'm not in /etc/passwd all access would be denied?
use
Code:
getent passwd <username>
Where <username> is your username you use to login...

-C

Last edited by custangro; 03-16-2010 at 12:07 PM.
 
Old 03-16-2010, 12:23 PM   #6
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438
Blog Entries: 5

Original Poster
Rep: Reputation: 32
thanks for the comments, some good ideas there. Cheers.
 
Old 03-16-2010, 12:29 PM   #7
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by stabu View Post
thanks for the comments, some good ideas there. Cheers.
tell which, if any works...and then mark the thread as resolved.
 
Old 03-16-2010, 12:30 PM   #8
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:

This is weird, because I *can* log in. Surely if I'm not in /etc/passwd all access would be denied?

the authentication does not have to be local
 
  


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
AIX : Two entries with the same username in /etc/passwd quanba Linux - Newbie 1 08-29-2009 12:30 AM
ubuntu username & passwd problem azmike Linux - Newbie 8 08-22-2006 09:48 PM
Lost username/passwd (Slackware 10.2) PastorFrederick Linux - Newbie 5 12-23-2005 10:15 AM
Changing username/passwd in Thunderbird leupi Linux - Software 2 04-17-2005 10:35 AM
root passwd and username latika.gk Linux - Newbie 3 05-26-2003 07:24 AM


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