Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
i missed up my users log in-- instant help needed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
t_arow
n00b
n00b


Joined: 16 Sep 2004
Posts: 24

PostPosted: Tue Sep 21, 2004 9:13 am    Post subject: i missed up my users log in-- instant help needed Reply with quote

hi, i just managed to install gentoo aweek ago, and concidering this being the first time i ever interact with linux, i think i did a pretty good job. but now i think i did something really wrong

i was trying to create anew user called "arow"
and i typed exactly this

useradd -g users -G wheel -s /bin/bash -m arow

i didn't get anything wrong, now, i rebooted my system. the grup works fine, every check reads {ok}... and the nvidia and kde starts just fine. but then, the log in box is not the same as before, i dont have the user names with the pictures on the left side anymore.
and worst is that i can't log into the system neither as root or as any other group user... it keeps reading failed after i enter the username and password.

so, i have the system all intalled and working, but dont have any access to it. can you please help me... what should i do, to get my gentoo the way it was before i did the command of "useradd" ????
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Tue Sep 21, 2004 9:17 am    Post subject: Reply with quote

If you press ctrl+alt+f1 you should switch to a console. Can you login there?
Back to top
View user's profile Send private message
t_arow
n00b
n00b


Joined: 16 Sep 2004
Posts: 24

PostPosted: Tue Sep 21, 2004 9:29 am    Post subject: Reply with quote

i'll go try now, but say it does work, is there anyway of fixing the problem ??

because i'de rather not keep doing this everytime.

thnaks
Back to top
View user's profile Send private message
t_arow
n00b
n00b


Joined: 16 Sep 2004
Posts: 24

PostPosted: Tue Sep 21, 2004 9:41 am    Post subject: Reply with quote

i just tried the console log in and it also doesn't work, it gives me this

login(pam_unix)[1157]:check pass; user unknown authintecation failure; logname= uid=0 euid=0 tty=/dev/vc/1 ruser= rhost=

and at the end it says

failed login session from /dev/vc/1 for unknown,authintication failure. login incorrect

please help me, i was starting to like linux so much, but i wont go theough the installation process again during one week, please help me
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Tue Sep 21, 2004 9:54 am    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic.php?t=197847&highlight=authentication+failure
offers a solution. Boot from your live cd, mount your root partition (/dev/hda3 probably)
mount /dev/hda3 /mnt/gentoo
then edit your password file:
nano -w /mnt/gentoo/etc/passwd
and remove the x ->
root:x:0:0:root:/root:/bin/bash
becomes:
root::0:0:root:/root:/bin/bash
Now you should be able to reboot (remove the livecd) and login again as root, leaving the password blank. Set a new password for the root with:
passwd
Then you should also be able to reset the passwd of the new user:
passwd arow
Back to top
View user's profile Send private message
t_arow
n00b
n00b


Joined: 16 Sep 2004
Posts: 24

PostPosted: Tue Sep 21, 2004 10:27 am    Post subject: Reply with quote

hey, i just tried the livecd booting, but i think maybe the file "/mnt/gentoo/etc/passwd" is read only or something, because i only get signs and marks when i enter it with nano
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Tue Sep 21, 2004 10:36 am    Post subject: Reply with quote

Well I think it should work, and if the file is garbled it would explain why you can't login. Try to chroot into your mounted installation:
mount /dev/hda3 /mnt/gentoo
chroot /mnt/gentoo /bin/bash
env-update
* Caching service dependencies...
source /etc/profile

then:
mv /etc/passwd /etc/passwd.backup
emerge baselayout

and check if the file is reinstalled
cat /etc/passwd
and set your root passwd with:
passwd
next time you try to add the user use the command shown here:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=11
Back to top
View user's profile Send private message
t_arow
n00b
n00b


Joined: 16 Sep 2004
Posts: 24

PostPosted: Tue Sep 21, 2004 12:20 pm    Post subject: Reply with quote

BlackEdder wrote:
Well I think it should work, and if the file is garbled it would explain why you can't login. Try to chroot into your mounted installation:
mount /dev/hda3 /mnt/gentoo
chroot /mnt/gentoo /bin/bash
env-update
* Caching service dependencies...
source /etc/profile

then:
mv /etc/passwd /etc/passwd.backup
emerge baselayout

and check if the file is reinstalled
cat /etc/passwd
and set your root passwd with:
passwd
next time you try to add the user use the command shown here:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=11


well, i was trying to do what you are explaining and here are the problems i encountered.
when i try emerge baselayout it gives me this message

'portage' user or group missing.please update baselayout and merge portage user(250) and group(250) into your passwd and group files. non root compilation is disabled until then.

for the defaults, line 1 goes into passwd. and line 2 into group
portage:x:250:250:portage:/var/tmp/portage:/bin/false
portage::250:portage
Back to top
View user's profile Send private message
t_arow
n00b
n00b


Joined: 16 Sep 2004
Posts: 24

PostPosted: Tue Sep 21, 2004 12:21 pm    Post subject: Reply with quote

and by the way, the messege i just posted is the same one i get when i try doing env-update, but it still works
Back to top
View user's profile Send private message
t_arow
n00b
n00b


Joined: 16 Sep 2004
Posts: 24

PostPosted: Tue Sep 21, 2004 12:24 pm    Post subject: Reply with quote

well guys, another question, is there any reason why the file "/etc/passwd" looks like gibresh... its all marks and symbols !!!
and how can i edit this file ???
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Tue Sep 21, 2004 12:36 pm    Post subject: Reply with quote

Ok sorry it didn't work yet :) I've never had this problem, so I just guess the methods :)
We will try to use the passwd file from the livecd. I would think this one is the same as the one in the baselay out would be
Code:

mount /dev/hda3 /mnt/gentoo
mv /etc/passwd /mnt/gentoo/etc/passwd
chroot /mnt/gentoo /bin/bash
env-update
* Caching service dependencies...
source /etc/profile

now set your root passwd
Code:

passwd

as a reference: this should be what the default passwd file looks like:
Code:

[root@edder ~/tmp/rc-scripts-1.4.16/etc ]$ cat passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
adm:x:3:4:adm:/var/adm:/bin/false
lp:x:4:7:lp:/var/spool/lpd:/bin/false
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/bin/false
news:x:9:13:news:/usr/lib/news:/bin/false
uucp:x:10:14:uucp:/var/spool/uucppublic:/bin/false
operator:x:11:0:operator:/root:/bin/bash
man:x:13:15:man:/usr/man:/bin/false
postmaster:x:14:12:postmaster:/var/spool/mail:/bin/false
cron:x:16:16:cron:/var/spool/cron:/bin/false
ftp:x:21:21::/home/ftp:/bin/false
sshd:x:22:22:sshd:/dev/null:/bin/false
at:x:25:25:at:/var/spool/cron/atjobs:/bin/false
squid:x:31:31:Squid:/var/cache/squid:/bin/false
gdm:x:32:32:GDM:/var/lib/gdm:/bin/false
xfs:x:33:33:X Font Server:/etc/X11/fs:/bin/false
games:x:35:35:games:/usr/games:/bin/false
named:x:40:40:bind:/var/bind:/bin/false
mysql:x:60:60:mysql:/var/lib/mysql:/bin/false
postgres:x:70:70::/var/lib/postgresql:/bin/bash
apache:x:81:81:apache:/home/httpd:/bin/false
nut:x:84:84:nut:/var/state/nut:/bin/false
cyrus:x:85:12::/usr/cyrus:/bin/false
vpopmail:x:89:89::/var/vpopmail:/bin/false
alias:x:200:200::/var/qmail/alias:/bin/false
qmaild:x:201:200::/var/qmail:/bin/false
qmaill:x:202:200::/var/qmail:/bin/false
qmailp:x:203:200::/var/qmail:/bin/false
qmailq:x:204:201::/var/qmail:/bin/false
qmailr:x:205:201::/var/qmail:/bin/false
qmails:x:206:201::/var/qmail:/bin/false
postfix:x:207:207:postfix:/var/spool/postfix:/bin/false
smmsp:x:209:209:smmsp:/var/spool/mqueue:/bin/false
portage:x:250:250:portage:/var/tmp/portage:/bin/false
guest:x:405:100:guest:/dev/null:/dev/null
nobody:x:65534:65534:nobody:/:/bin/false
Back to top
View user's profile Send private message
t_arow
n00b
n00b


Joined: 16 Sep 2004
Posts: 24

PostPosted: Wed Sep 22, 2004 3:32 pm    Post subject: Reply with quote

thanks alot man, i dont know which one helped but now its working just fine...

by the way it truned out that the password will get wrong every time i rebooted, and eventually i found out that there was some command i had to do that would make anew /etc/shadow file of the /etc/passwd and that fixed it

i appreciate the help man.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
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