LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Users cannot open a console??? (https://www.linuxquestions.org/questions/linux-software-2/users-cannot-open-a-console-99279/)

raid517 10-02-2003 12:20 AM

Users cannot open a console???
 
Hi I am using Gentoo linux kernel-2.6-test6. As root I can open a terminal no problem, but whenever i try to create a user I get hit by the following errors:

Code:

No shadow entry for Cron.
No shadow entryfor squid.
no shadow entry for gdm.
No shadow entry for xfs
no shadow entry for named
No shadow entry for my sql
no shadow entry for postgres
no shadow entry for apache
no shadow entry for nut
no shadow entry for cyus
no shadow entry for vpopmail
no shadow entry for alias
no shadow entry for qmaild
no shadow entry for qmail
no shadow entry for qmailp
no shadow entry for qmaiq
no shadow entry for qmailr
no shadow entry for qmails
no shadow entry for postfix
no shadow entry for smmsp
no shadow entry for portage

I have no idea what most of those mean (bar portage] and I confess I did try and make myself a member of as many groups as possible in the hope of avoiding future problems. This might have been a dumb thing to do, but I don't know. In any case the new user is created, but when I open the account I cannot open a terminal to perform any action, which as you know in Linux is not much good. Without access to the CL, there isn't much that can be done.

How do I fix this and ensure users have access to the CL too?

I have looked at the file 'shadow' in etc, and I'm afraid I can't make head nor tail of it, nor have I any idea how to edit it.

I am not sure if this is why I cannot make a user who can open a terminal, however the only error message I get is 'error, could not open suitable terminal device'. Has anybody got any idea what this means, or better still how to fix it?

Q.

td_miles 10-02-2003 01:03 AM

Not sure if Gentoo is the same as RedHat, but it sounds like you don't have a shadow password file or it is corrupt or something similar. (just guessing)

On RedHat I would have a look in /etc/sysconfig/authconfig to see how it is configured. You can also run /usr/bin/authconfig to reconfigure the authentication used. You could try removing shadow passwords via authconfig, rename the /etc/shadow file and then enable shadow passwords again to see if it will recreate the /etc/shadow file.

Sorry, I'm not sure how much help this will be on Gentoo.


regards,
Tony.

raid517 10-02-2003 01:28 AM

Well I'm sorry to say that file or utility doesn't exist in gentoo (yet, unless it's something I can emerge/install). For curiosities sake, and out of what is I'm afraid, growing desperation with gentoo. I have included /etc/shadow file below.

If anybody can make sense of it your input would be a great healp to me.

[Edit]

Q

td_miles 10-02-2003 01:36 AM

Try this URL:

http://www.mail-archive.com/gentoo-u.../msg18185.html


As it suggest, you could try running the "pwconv" command. On my RH box, the man pages say:

"pwconv creates shadow from passwd and an optionally existing shadow."

So if something has happened to your shadow file, pwconv should replace it. You can also try the command "pwunconv":

"pwunconv creates passwd from passwd and shadow and then removes shadow"

I am assuming that there is nothing important on this machine, so that if you somehow destroy the user database altogether, it won't matter if you have to reinstall. If you have any important data on the machine, now is the time to back it up, before trying any of this stuff.


regards,
Tony.

raid517 10-02-2003 02:01 AM

Well if you know anything about gentoo, you will know that 'just reinstalling it' isn't really an option. Gentoo rates among the hardcore of linux distributions. Indeed its installation is only a step away or two from Linux from scratch. It's not so much difficult as extremely time consuming, so it isn't something you would want to repeat in a hurry.

So yes, backup is certainly a vitally important thing to do before making any potentially dangerous or destructive changes.

I'm tempted to tackle my problems with alsa first though before I do this, but oh well, one thing at a time I guess.

Q

mossy 10-02-2003 02:17 AM

did you just post the encrypted contents of your password file?

Someone correct me if I am wrong here....

;)

raid517 10-02-2003 02:19 AM

Ok call me crazy, but since it came from official gentoo developers I decided to give it a go and throw caution to the wind. The result is no more complaints when setting up users. However I still cannot open a terminal when I create a user. Whenever I try I still get an error message saying 'cannot open a suitable terminal device'. This is despite adding the new user to every concievable group going (except nogroup etc), including root. So I don't think it has anything to do with permissions.

Now I really am confused.

Q

raid517 10-02-2003 02:25 AM

Quote:

Originally posted by mossy
did you just post the encrypted contents of your password file?

Someone correct me if I am wrong here....

;)

Mate, my computer is likely to be of so little interest to a hacker as to be virtually irrelevant. It is just a little home based machine, It does nothing special other than play movies and music. (Or that is it would if I could get sound to work properly).

I can't imagine anyone would find anything intersting on it. I don't do online banking as i simply don't trust it.

In any case i edited it as it is no longer important/relevant..

Still if anyone does want to hack my computer, they are welcome to try. Maybe they will have better luck fixing these problems than I have had. :)

Q

td_miles 10-02-2003 02:26 AM

Can you post the output of "tail /etc/passwd"

If you're using shadow passwords then this won't contain any sensitive info.

There should be no need to add the users to multiple groups.


regards,
Tony.

raid517 10-02-2003 02:31 AM

Lol you beat me to it, see above. Anyway yes here is the output as requested. I'm not too worried about security. If I was at work it would be a different matter.

Code:

bash-2.05b# tail /etc/passwd
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
sshd:x:22:22:sshd:/var/empty:/dev/null
ldap:x:439:439::/usr/lib/openldap:/dev/null
games-ded:x:36:35:added by portage for scorched3d:/usr/games:/bin/bash
q:x:1000:100::/home/myusername/bin/bash
bash-2.05b#

Obviously the :) are not my doing.

Q

mossy 10-02-2003 02:32 AM

heh heh I understand. However your computer can be used to launch other attacks. Last thing you 'd want is anyone tracing it back to you.

td_miles 10-02-2003 02:52 AM

Hopefully it is just a typo with the cut/past, but in the line:

q:x:1000:100::/home/myusername/bin/bash

there should be a ":" (ie the field seperator) between the "/home/myusername/" and the "/bin/bash"

Have you tried adding a new (different user) and/or deleteing and re-adding the existing one ?



regards,
Tony.

Although if this was the case, then the user probably shouldn't be able to log on at all as they don't have a valid shell.

raid517 10-02-2003 03:03 AM

A typo sorry. Just somebody mentioned security, so I changed some details. /home/myusername:/bin/bash is what I meant to print. And yes I have tried deleting and readding a user on multiple occasions.

But still no luck, still the smae 'cannot connect to a suitable terminal device'.

I wondered if this might be to do with the fact that I had originally disabled Linux98PTY support in the kernel, due to a weird conflict with Nvidia drivers. But that was among my first thoughts and I quickly reenabled it long before I posted my question here.

This really is a puzzle. There seems to be no logic to it at all.

Q


All times are GMT -5. The time now is 12:05 PM.