I have no name - Custome user login

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
Zew
DD-WRT User


Joined: 30 Jan 2011
Posts: 56

PostPosted: Tue Nov 20, 2012 21:10    Post subject: I have no name - Custome user login Reply with quote
Once again lets get down to the nitty gritty.

Model Asus RT-N16.

Build: 16780M
Firmware: DD-WRT v24-sp2 (04/12/11) stdkong

Here's the issue I have been having lately. I created a new user using useradd, then manually created the MD5 hash key for the user and placed into /etc/passwd for the newly created user.

Created the users home dir on the mounted USB drive. I was able to log in remotely and configured dropbear not to accept root login, and placed this new user under the sudoers list.

All was working fine, and when the user logged in showed the username@server, like normal.

A co-student that suggested the hardening procedure to block root login and enable a sudoer, as stated above then informed me of Issri (Text based IRC chat) and screen (allows me to detach screen to return to it at a later time).

Now all of a sudden when I log in with this user it comes up as I have no name!@server. All the research I have done says that the /etc/psswd file is not able to be read by users.

So I checked the permissions of said file and found that /etc/passwd(777) is linked to /tmp/etc/passwd(644). The permisson seem setup correct. However when the specified user runs cat /etc/passwd, nothing shows same if said user runs cat /tmp/etc/passwd.

If the user runs whoami, nothing is returned.
If the user runs ssh, states unknown user 1000

I can't literally find nothing about this in the forums, any ideas I could try?
Sponsor
Zew
DD-WRT User


Joined: 30 Jan 2011
Posts: 56

PostPosted: Sun Dec 02, 2012 0:37    Post subject: Reply with quote
I figured it out.... finally

after playing around for a while and trying different things... including setuserpasswd, which didn't even change the password to the user specified in the command. and somehow changed my root user password to something that I didn't even set...

Was forced to do a factory reset, figured I'd update the firmeware so now I'm on DDWRT kong-mod 19545..

and it was still doing it, then I noticed from this topic
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=689478

that the /tmp/etc/ folder requires r and x permission set not just read, which is set by default.

So that's It, just make sure the parent folder has correct permission set..
dargo
DD-WRT Novice


Joined: 07 Feb 2013
Posts: 3

PostPosted: Thu Feb 07, 2013 14:15    Post subject: Reply with quote
I just finally registered here to tell you thank you! Granting +rx on /tmp/etc solved my sftp problem. It was driving me crazy!
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum