LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   newbie > root can log in to a gui, users suddenly can't (https://www.linuxquestions.org/questions/slackware-14/newbie-root-can-log-in-to-a-gui-users-suddenly-cant-368212/)

Influx 09-29-2005 02:35 PM

newbie > root can log in to a gui, users suddenly can't
 
Intro:

I'll give an introduction to the problem, and I hope you all will request clarity as to output of log files, commands, etc. Just give me what to type and i'll give the output as i'm still a fresh newbie rapidly learning, but the learning curve is steep.

Problem:

I try to log in as a normal user (homecomp) and it looks like it is starting to log in, then the screen flickers once, then drops me back to the same graphical prompt like I never logged in. I login to root and everything is perfect, no problems, kde starts up fine. So I tried making a new user, and when I log in, the screen hangs and I can't do anything besides restart the x server and redo the process all over again.

Prior to problem:

I installed the nvidia drivers and I think I fluked out when I installed them correctly this time (last time I had this same problem, and I just formatted and started again, like a good newbie :D ), I was thrilled to see the nvidia logo when it starts up in graphical mode this time, and even more thrilled to be able to log in. But after a while (probably a restart the next day) this problem occured again.

Another thing worth mentioning is I've been playing with the latest wine, and have installed, and uninstalled serveral times, using different approaches (binary and source). Could this somehow corrupt something and cause this to happen?

Hardware:

P3 550
448 Megs ram
Nvidia Geforce 2 mx 200 (or 400, I have to double check if it makes a difference)
1 20 gig and 1 40 gig drive, only 4 megs allocated for slackware, 98 megs allocated for the swap.

Possible problems?:
Could settings in my xorg.conf be messed?
Did I install the nvidia driver wrong? I see the logo and all, and my screen savers are roaring fast
I'm running very low on disk space for slackware, could low disk space cause this to happen?





Thanks everyone for taking the time to read this, i tried to be as accurate and detailed as possible, i'm at work so I can paste my xorg.conf when I get home later. Please if need be request for clarity, I'd really like to get slack fully working so I can finally nuke windows, or at least adjust my free space accordingly so I can use slack with much more free space. :)

dracolich 09-29-2005 02:59 PM

Low disk space could cause problems such as this. Whenever KDE starts, for any user, it has to write a lot of stuff to /tmp. If you only have a few free MB then it can't write to /tmp so KDE will fail. A neat trick is to dig up an extra hard drive, format it with your fs of choice, and use it as your user's home directory.

Another possible cause is a ~/.xinit file. If your user has this file and it's empty that can cause this type problem also. Either delete it or add a line to it to start the gui (e.g. startkde).

Influx 09-29-2005 04:19 PM

Thanks for the quick reply, I should be up and going when I get home from work :) I could easily make a new partition on my 2nd hd, how do I mount it so it is attached to a particular home directory?

Also does it matter that root can still log in fine, but even if I log into the user account first it doesn't work? If it can write files for root then it should write files for a user too, right? as long as it is the first to log in.

dracolich 09-29-2005 05:00 PM

One would think if root can login then a user should be able to if the user logs in first. But that's not always the case. I would first see about the ~/.xinitrc file. If it exists see if anything's in it. If you use a graphical login manager try starting X without that (boot into runlevel 3 and use the startx command.

I forgot you mentioned wine the first time. I learned once that extracting the wine source tree and then building it eats up 800+ MB!

Yeah, I guess you could give some of that swap space to your user. 98 is a lot just for swap. 8GB of that should be plenty. You might want to create one for /tmp also. After creating a new partition follw these steps as root assuming the new partition is hda2 formatted as ext2:

1) mkdir /mnt/hda2
2) mount -t ext2 /dev/hda2 /mnt/hda2
3) cp -R /home/<username>/*/mnt/hda2
*don't delete the old one yet*
4) edit /etc/fstab - add a line that reads
/dev/hda2 /home/<username> ext2 defaults 0 0
5) mv /home/<username> /home/<something different>
6) mount /dev/hda2

See if you user files appear. The same procedure will apply for any other directory you want to put onto seperate partitions. /tmp or /usr/local or any other.

Influx 09-29-2005 09:57 PM

Alter the FONT of your text
 
Ok, so I booted into init 3 mode, and logged in with startx, got the account working and logged in fine, now everything is *somehow* back to normal lol

Now what I'm trying to do is resize hdb1 which is 40 gigs of ntfs. I want to split it up and I know qtparted will do the job, however in my fstab file my ntfs drives get mounted as this:

/dev/hda1 /ntfs-hda1 ntfs ro 1 0
/dev/hdb1 /ntfs-hdb1 ntfs rw 1 0

(I changed hdb1 to rw because I figure qtparted would need to have read/write access to the drive. in order to resize it) I restart the computer so it can see the edited entry in fstab, however I still only have read only access, even as root. If there was a smiley for smashing it's head on a wall, i'd put it here.
Could you enlighten me on how to do this? I'm still trying to wrap my head around how mount/umount works, but so far no luck.

dracolich 09-30-2005 07:21 AM

A restart isn't necessary for changes to fstab (unless it's /), only umount then mount again. NTFS isn't well supported in linux yet. So far only read support exists and the ability to modify a file as long as the size doesn't change. I'm not familiar with qtparted, but if it's like most other disk utilities I've used, the target partition should be unmounted before working with it. So if you're modifying hdb1 it's best to unmount hdb1 before working with it this way.

Influx 09-30-2005 02:03 PM

Permissions, etc
 
This should be the last question I have for this thread -


So is it good practice to add say more than one entry in the fstab file? Here's some lines from what I'm trying to do in fstab:

/dev/hdb2 /usr ext3 defaults 1 2
/dev/hdb2 /home ext3 defaults 1 2

so I'll have two mounts pointing to different directories. Is this the correct way of using my new partition for say, storing the files in /usr and /home* on my new partition?

I want to stay secure, and still have the same usability I had before I do these changes - I was doing all this in root and when I first logged in, alot of crazy stuff happened, so I went into console, logged in and noticed it couldn't read the home dir. I changed ownership to the user, and it seems fine now, but I worry that I might have somehow compromised the filesystem security.

If you could advise what I should worry about and do, again, thank you for your wisdom ;)

Alien Bob 09-30-2005 02:32 PM

Re: Permissions, etc
 
Quote:

Originally posted by Influx

So is it good practice to add say more than one entry in the fstab file? Here's some lines from what I'm trying to do in fstab:

/dev/hdb2 /usr ext3 defaults 1 2
/dev/hdb2 /home ext3 defaults 1 2

so I'll have two mounts pointing to different directories.

I'd say that is the road to diaster.
Never mount a device on multiple mount points. I mean, what's the point of doing so in the first place? And what do you think would happen when two different programs change the same file at the same time, but one does it via /usr and the other does it via /home ? You'll be lost.

BTW, NT partitions under a 2.4 kernel are always mounted read-only, even if you specify the 'rw' flag in /etc/fstab. Only 2.6 kernels allow (limited) write access.

Eric

Genesee 09-30-2005 05:11 PM

Re: Permissions, etc
 
Quote:

Originally posted by Influx

/dev/hdb2 /usr ext3 defaults 1 2
/dev/hdb2 /home ext3 defaults 1 2

so I'll have two mounts pointing to different directories. Is this the correct way of using my new partition for say, storing the files in /usr and /home* on my new partition?

no, that would be very bad, even if it could work :D -- why not just make two new partitions (ie, hdb2 and hdb3)?

Influx 09-30-2005 06:19 PM

I figure having less partitions is better than having a whole bunch. Or is the common practice to make lots of partitions and mount them in the different directories that way?

Alien Bob 10-01-2005 07:49 AM

It's entirely up to you if you want a lot of partitions or not.
A good idea would be to have at least /home in it's own partition. That makes it easier when you want to upgrade your box by formating your partitions before installing a new Slackware. When your /home is in a separate partition, you can keep that data safe when partitioning the rest. Some put /usr/local in a separate partition too, when they compile a lot of software themselves.
Only if you have very big harddisks, or a server with a lot of activities going on, can you think of putting /tmp and /var in their own partitions. But on my desktops, I only have / and /home as separate partitions.

Remeber though, never mount a partiton on more than one moint point, as you suggested you would do in an earlier post.

Eric

Influx 10-04-2005 06:40 PM

Thanks, that gives a really good idea as to how I should distribue the different partitions I've made already, and as to where I should be mounting them.

Thanks for the help guys.

Influx 10-07-2005 04:49 PM

Again, I'm having the same problems, and need assistance. There is enough space on the drive this time, and the existing user can't login, AND when I create new users, they can't login either.
I login with bash and it gives me a few errors that this and that isn't found, for instance, fortune. Any ideas?

dracolich 10-08-2005 08:23 AM

Sounds like a permissions problem, especially if you created the new partitions and directories as root by hand, either with the /tmp directory or the users' home directories. Do ls -l on /tmp and the users' homes and check ownership and permissions. /tmp should be 777 (rwxrwxrwx) so anyone can read/write in it. And each users' home files should be owned by <username>:users, except some of the dot files and dirs which would be <username>:root.

You might also check permissions on the programs that the users can't access. Most should be 766 or 666. Start in /bin and /usr/bin.

Influx 10-08-2005 08:54 AM

Would copying the entire user directory as root in kde ruin the permissions? I reset permissions entirely as homecomp<the user in question> and group as users, including all subdirectories. Is it important for some . files to be as root? I figure as long as homecomp can access it's directory, that everything would be fine. Also, why can't I make a new user and login (same thing happens)?


All times are GMT -5. The time now is 06:49 AM.