Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
"Please contact your system administrator to resolve the following problem:
Could not open or create the file "/home/username/.gconf-test-locking-file"; this indicates that there may be a problem with your configuration, as many programs will need to create files in your home directory. The error was "Permission denied" (emo = 13)"
Apparently I've locked myself out of my home directory. The last command I entered UNsuccessfully was
"smbmount //server/share /home/username"
I got the error
"smbmnt must be installed suid root for direct user mounts (500,500)"
as su. I was then able to run the smbmount command. These were the only commands I entered since my previous login. My next objective was to read the /etc/fstab file, but when I tried to view it in the GUI, I got an error "Unable to start Text Viewer". I rebooted and got the "Permission denied" error above.
Anybody know what I did wrong this time? I could log on as root and delete the user account, but that won't help me learn what I did wrong.
Last edited by Charlie Spencer; 07-20-2006 at 07:00 AM.
You mounted the samba share on top of your user directory, so you can't access any of the files that are normally in the directory. The first thing you want to do is unmount the samba share. Without knowing what you're mounting it for, I couldn't say what you should do next, but I'm guessing you should create a directory to mount the share in such as /home/username/share and mount it there. If it's a mount you will want to be using every time you start up the computer, you should add an entry to your /etc/fstab. For security reasons you should disable non-suid access to smbmount, unless you really need it.
restart your pc and the problem would be gone. if still the problem then log in as root and chown your home dir (/home/user) back to the user (chown -R user: /home/user) this should solve the problem (you donot need to delete and recreate the user). like said before, you mounted your samba share on top of your home dir (/home/user), since you used root to most probably do this, you as a normal user do not have any permissions over it (maybe read, but certainly not write) and any user login certainly would want write permission over the user's home directory and since its not there, the login's are failing.
Gethyn, the share is my home directory on our Windows domain. I do want to mount it every time, and I was trying to read the /etc/fstab file when I first began having problems. Will I be able to use this subdirectory for more than one share, or for other files?
prozac, a complete shutdown did fix the problem, instead of the reboot I previously tried. I did not use root to mount the share, although I did use it for the chmod command. I issued the smbmount as my user account after exiting su. I understand what you're saying about my not having access to the share -IF- I had mounted it as root. Even if I had, why would I be unable to access my entire home directory just because it had a subordinate mount point I couldn't access?
If I understand what you're both saying, I can't mount this share under my Linux home directory without locking myself out. Does that apply only to shares from a Windows domain, or would I have the same problem with any share mounted in /home/username, regardless of the source?
Last edited by Charlie Spencer; 07-20-2006 at 09:13 AM.
Mounting anything in a directory hides the original contents of that directory. It couldn't work any other way, otherwise what would happen if you had two files with the same name, one inside the directory and one inside the share?
Since you are mounting the share every time you boot, you should most definitely not be mounting it as an ordinary user. There is no need to do so. Just add an entry to /etc/fstab and it will automatically be mounted for you. I have a similar samba share at work. I have created an empty folder in my home directory, and set /etc/fstab to mount the share on that directory. This seems like the most sensible solution to me, if all you are mounting the share for is access to work files stored in it.
If you really, really want to use this share as your home directory, it should be possible. Just mount it to a temporary location, and copy all of the files in your home directory into it. Then set /etc/fstab to mount it for you, and reboot. Make very sure you have set the options for the mount correctly before you reboot though!
Edit: sorry, I missed one of your questions on the first read through. Yes, you can mount any number of different things on the same directory, but only one of them can be mounted at any given time. This means that you cannot mount several shares to the same directory via fstab, as you would need to unmount a share before you could mount the next. If you have several shares you want access to simultaneously, you will have to create mountpoints for all of them.
I'm learning Linux with an emphasis on running it as a desktop client in a corporate Windows Active Directory domain. I installed RH9 on a P600 two weeks ago and I'm climbing the learning curve. I don't have any files in my local home directory to move, and the share is already my home directory for my existing Windows domain account.
"Mounting anything in a directory hides the original contents of that directory. It couldn't work any other way, ... "
It could if you misunderstood how mounting works. I mistakenly thought of it as being like a Windows shortcut. Windows will allow a logical pointer to a directory to exist as a file within another directory. I didn't realize the mounted share actually established the share as the contents of what I mistakely thought was a parent.
I suspect I'll have to do several reinstalls during my education, so I'm going to leave the security on the smbmount command as it is but not change it after the next install. I'll change the /etc/fstab just before I reinstall; that way if I screw it up, it won't matter.
Last edited by Charlie Spencer; 07-20-2006 at 12:56 PM.
I don't have any files in my local home directory to move, and the share is already my home directory for my existing Windows domain account.
if you directly mount this in your Red Hat /home/user you will temporarily lose everything that was inside /home/user including your settings (they are hidden and do a ls -a to see all of them) typically, .bashrc, .bash_profile etc.., these files are read by system when login in a user. also mounting anything there will most probably change the owner too hence rendereing your login attempts useless.
I suggest you make a separate directory under /home/user, something like /home/user/myShare then mount your share there with smbmount