LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Adding Users In X (https://www.linuxquestions.org/questions/linux-desktop-74/adding-users-in-x-585708/)

royce2020 09-18-2007 11:27 PM

Adding Users In X
 
I have a Debian machine that I am trying to add users to, so that they appear at the login prompt. I'm sorry that I don't recall what it's called, it's the visual one that Knoppix uses, allowing a user to click on their name, I think it's part of X, but I'm not sure. I've added said users using kuser, and I can log on using the new username and password at the virtual terminals, or using the su command, but they don't appear is the user list of this graphical login thing (and it doesn't work if you type them in either). Because I'm doing this for some very GUI orientated people, being able to log into a virtual terminal isn't a bad thing, but it will seriously freak them out.
I'm still quite new at linux, I've never had to add users using the command line, and wouldn't have a clue where to start anyway.

blackhole54 09-19-2007 07:58 AM

This sounds to me like an issue with the graphical login manager (gdm, xdm, etc) rather than an issue with X or with creating a user account (i.e adding an entry to /etc/passwd, etc.). Of course, you have to add the user to the system, but you have already done that. I am not sure what Debian uses, but I know with gdm, the is a tab in the "Login Window Preferences" dialog for selecting which users can login through the GUI.

b0uncer 09-19-2007 09:07 AM

The users should be "added" to the list automatically (default settings); after adding the user try to log in as that user and see if it works (if it fails, then it could be that -- if it succeeds, the problem is in the login manager configuration I suppose).

The login manager may have a list of the users it displays in the list that you can click; by default it should display every ordinary user (no system user accounts), but it may be that it's configured some other way. Open up the login manager configuration, head to the tab where users/userlist is configured and make sure the newly added user is in the list of those users that are shown.

royce2020 09-19-2007 05:52 PM

I loged in as the new user using the graphical login manager by typing their name in (forgot that usernames are case sensitve in linux) and password, got into KDE, added user to all the groups the orginal user belonged to, Loged off.

But the list of names is still only has the first user that was set up when Knoppix was installed.

Edit:
This is a moot piont now, as the mchine only shows a flashing cursor even if I swich virtual terminals using ctrl+alt+F#. I just loged on agan and off again. Samba is still working so I don't ant to restart. SSH is turned off. Is there any other way I can get a command prompt? (or should I be starting a new thread for this?)

royce2020 09-24-2007 10:53 PM

I've sorted the whole flashing cursor thing, but in the process I had to kill X.
I have since brought up xdm (so my consolophobe users can log in), which I have discoverd is not the manager I had originaly, becuse it has no helpfull list of users, just a coupple of text boxes.

The kdm deamon will run, but dosen't affect X, and gdm won't run at all (this realy isn't suprising considering I don't have gnome). Are there any more common ones I should be trying?

blackhole54 09-25-2007 02:29 AM

Quote:

Originally Posted by royce2020 (Post 2902725)
The kdm deamon will run, but dosen't affect X .... Are there any more common ones I should be trying?

I am baffled by what you mean that kdm does not affect X. It runs on X! The only GUI login managers I've heard of are kdm, gdm, and xdm, but there is much I do not know! :)

If you killed X w/o doing anything else, I would have expected the login manager you were using to start another instance of X and present you with another login. That didn't happen?

Have you totally "lost" the login manager you orignally had?
What runlevel are you in? (Use the /sbin/runlevel command w/o parameters -- the second number/letter is your current runlevel.)

Sorry if my questions seem a bit disjointed. I am having trouble getting a picture of what is going on with your box.

royce2020 09-25-2007 08:48 PM

Quick rundown from the beginning of the story so far:

Earth was created, dinosaurs evolved, died and turned into oil.
I installed Knoppix.
I can logon to Knoppix using the user setup during install, and the login manager has a list of available users containing only the one.
I add another user.
I can log onto the vt with this user
I log off of X, and the login managers list of users still only has one entry.
I type in the new users name and password, and I log onto X as the new user.
I log off of X, to see if this has added the new user to the login managers list, which it hasn't.
I log on using the original user to google for more options.
Googling produces no help.
I log off of X.
Instead of bringing up the logon manager, the machine freezes.
I use the k magic key to kill all processes on the current vt, which then drops me to a command prompt.
I can run startx once loging onto one of the virtual terminals, this gets me into x windows, but without a login manager.
I start X (not using the "startx" command but invoking the X script that is run on startup). now I have a mouse cursor and a background when I press ctrl+alt+F5.
From another vt I run xdm. When I swap back using ctrl+alt+F5, I now have a very different login manager, with no list of users.
I kill xdm and X from the other vt.
I run the X script again, but instead of xdm I attempt to run gdm (which returns an error, because gnome is not part of Knoppix by default), and then kdm.
After pressing ctrl+alt+F5 I only have a background and mouse cursor, even though ps reports that kdm is running.
I kill kdm from another vt.
I start xdm again and after pressing ctrl+alt+F5 I have the display manager I don't want.
I decide that this is as good as I'm going to get without help.

I hope that's what you wanted to know.

blackhole54 09-26-2007 12:56 AM

Quote:

Originally Posted by royce2020 (Post 2903805)
I hope that's what you wanted to know.

Other than being confused about the dinosaurs ;) that gives me a little better picture of the situation.

While I've used KNOPPIX as a live CD, I've never installed it to HD. So that leaves me guessing at a few things. IIRC there is more than one way to install to HD. From what you've said I am guessing that you installed it as a Debian system? I also surmise that the original login manager, with the listing of users, was kdm, and that you now cannot get that running again. If a reboot is acceptable to you, I would try that and see if it brings kdm back.

If a reboot is not acceptable to you, here is what I would try: Kill any form of X, login manager, etc. Determine what your runlevel is, using the command runlevel. Check your rc[n].d directory for that runlevel; i.e. if your runlevel is 2, look at /etc/rc2.d. See if there is one of the entries that appears to be for kdm. I'll assume you see something like Snnkdm where nn is any two integers. If so try (as root)

Code:

invoke-rc.d kdm start
If the entry in /etc/rc[n].d was called something else, substitute that kdm. If it complains that kdm is already running, try restart instead of start. (I don't think you should need to start X prior to above command, and I would advise against it unless above command does not work by itself.)

Assuming you can get kdm running again and it presents you with the list of user(s) like before, I would suggest consulting the kdm handbook, particularly chapter 5. Search down until you find ShowUsers. This should tell you how to select which users to display. I believe you want NotHidden, to list all users on the system.

I hope this helps. As I said, I am guessing somewhat here since I have never installed KNOPPIX to HD.

EDIT: Re configuring kdm: My guess is there is a graphical way to accomplish the same thing the kdm handbook described via configuration file.

royce2020 09-26-2007 04:20 PM

Thanks, BlackHole. I sucseeded in getting the original login manager back using invokerc.d kdm start.
It still has the original list, with only one user on it. I'm guessing that the kdm hand book will help with that, but I I haven't had a chance to read it yet.

royce2020 09-26-2007 04:58 PM

Skimed the file.
Edited /etc/kde3/kdm/kdmrc
Restarted kdm

problem solved. Although I did have to tinker with the exact settings I needed in kdmrc, eventualy I found that setting MinUsers=500 did the trick (the original setting was 1000, and 0 shows all of the deamon users)

blackhole54 09-26-2007 11:45 PM

Quote:

Originally Posted by royce2020 (Post 2904798)
problem solved. Although I did have to tinker with the exact settings I needed in kdmrc, eventualy I found that setting MinUsers=500 did the trick (the original setting was 1000, and 0 shows all of the deamon users)

Cool! I think you nailed it. Just for your own information, verification, and learning, you can view all the UIDs in the /etc/passwd file and see the numbering scheme that is being used. This is a world readable file that has an entry for each user including that user's UID. You can look at it with your favorite text editor or a pager like less (my personal favorite). Just a little bit more of info to help you along the way ... This file used to also contain the encrypted password for each user. Since this file is world readable, doing that was somewhat of a security risk, so most distros now put the encrypted passwords in /etc/shadow which is readable by root only. You can flesh this out by looking at the man pages for passwd and shadow. For the passwd file use the

man 5 passwd

command or you will end up looking at the page for the command to change the password.

Happy trails as you explore Linux!


All times are GMT -5. The time now is 04:13 AM.