LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-11-2007, 09:43 AM   #1
ianq
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Rep: Reputation: 0
Thumbs up Many Problems - Need Help


Dear All

My first time to post here. Please give your best. Thank you.

SChool
Server running Redhat (i think linux 8 or 9 as it was installed 2 years ago, and TCAD is on the server.

1. When adding a new user using the KDE User Manager, home directory was not created although the box was checked. Tried adding 3 users subsequently but the same happen.

2. Changing user passwd in the same User Manager, have no effect, means the passwd was not changed, cannot login from a linux client, says "incorrect userid or passwd".

3. Login as root, cd to /home, chmod 777 to "." and ".." but permission denied although owner and group is ROOT.

4. Login as root but still cannot change ownership to many files and directories, Why ?

5. Is there any quotas that prevent the creation of excessive user home directories, that means more that a predefined quota, and if yes, where can i modify this value ?.

6. All the users are having /bin/csh, but i could not see any .profile or .cshrc in the individual home directories. Why ?

Thanks in advance
 
Old 01-11-2007, 10:59 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
cat /etc/issue (and depending on version) cat /etc/redhat-release should help you determine exact version of RedHat.

There is no quota that limits number of home directories. Quotas limit SIZE rather than quantity.

If root isn't letting you do things some possibilities:
1) Someone has change root to a UID other than 0 so it's not really the root user. grep root /etc/passwd to verify it has uid 0.

2) /home is an NFS mount from another machine. Typing df -h /home should let you know where it was mounted from. If an NFS mount the exporting machine would have had to specifically allow root to make changes on remote mounts.

3) /home and others have ACLs (Access Control Lists) implemented so the permissions are more restricted than you think. Run getfacl /home to see if it shows you any restrictions more than ls -ld /home show.
 
Old 01-11-2007, 11:05 AM   #3
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by ianq
6. All the users are having /bin/csh, but i could not see any .profile or .cshrc in the individual home directories. Why?
Check the file /etc/passwd for default shells for individual users. These files can be created later anyway, if needed.

edit:
Quote:
Originally Posted by ianq
3. Login as root, cd to /home, chmod 777 to "." and ".." but permission denied although owner and group is ROOT.
If you're in /home, and you try to change the permissions on '..', you're allowing everyone read and write access to your root directory - I don't think this is particularly secure.

edit 2: When you create a new user, the files which are created in their home directory are sourced from /etc/skel. If you want to create a .cshrc and .profile file every time you add a new user, include the -m flag in the adduser command (from the command line), and modify your /etc/skel file to include .cshrc and .profile. From the adduser manpage:
Code:
       -m     The  user's home directory will be created if it does not exist.
              The files contained in skeleton_dir will be copied to  the  home
              directory  if  the  -k  option is used, otherwise the files con-
              tained in /etc/skel will be used instead.  Any directories  con-
              tained  in  skeleton_dir  or  /etc/skel  will  be created in the
              user's home directory as well.  The -k option is only  valid  in
              conjunction  with  the  -m option.  The default is to not create
              the directory and to not copy any files.

Last edited by pwc101; 01-11-2007 at 11:16 AM.
 
Old 01-11-2007, 01:09 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
It seems his issue is permission related rather than command line. If he can't chown something as root then he likely can't write into it as root either.

He could do a simple test of that:

As root user on command line type:
touch /home/testfile

If it makes the testfile it he can write into it and its not general permissions. If it gives a permission error then it means he should explore permissions as I'd indicated and the likely reason it didn't create the home directory or put anything in from /etc/skell is the permissions problem.
 
Old 01-11-2007, 09:53 PM   #5
ianq
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks guys for the help, below are results: Still having the permission problem although i have check /etc/passwd for root and the uid=0 :

1
[root@tcadappsvr01 root]# grep root /etc/passwd
root:x:0:0:root:/root:/bin/bash
#root:x:0:0:root:/root:/bin/csh

2
cat /etc/issue give me this :
Red Hat Enterprise Linux ES release 3 (Taroon Update 4)
Kernel \r on an \m

3
For Jlightner

[root@tcadappsvr01 root]# touch /home/testfile
touch: creating `/home/testfile': Permission denied

4
[root@tcadappsvr01 skel]# ls -al /home |more
total 648
drwxr-xr-x 160 root root 4096 Jan 10 16:12 .
drwxr-xr-x 23 root root 4096 Jan 12 10:29 ..
drwx------ 3 default1 single 4096 Dec 9 18:18 default1
drwx------ 3 default2 double 4096 Dec 9 18:18 default2
drwx------ 3 default3 triple 4096 Dec 9 18:18 default3

Finally, although log in as root, but still could not do anything. Appreciate if there is a fix to this Permission thing.

Thank you all.
 
Old 01-12-2007, 12:08 AM   #6
ianq
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Original Poster
Rep: Reputation: 0
Dear All

Another problem i found:
Change user passwd using RH User Manager. Can loing at Server but cannot at Linux client. Keep saying wrong passwd.

Woosh, i am really at my wits end. Wish someone can help me. School is going to re-open for sessions.

???
 
Old 01-12-2007, 01:13 PM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
OK so you're using RedHat Enteprise 3 (2.4 kernel). We use RHEL AS 3 (Taroon update as well) and don't see the issues you do.

It's definitely some sort of permission issue with /home.

You didn't mentionw what happens when you do "getfacl /home" or "getfacl /home/*".

Also you didn't provide the "df -h /home" output.

I don't think SELinux was introduced in that release (at least I've never had to enable/disable it for that on our RHEL 3 systems) but you can check. Disabling SELinux helps a lot of thing. Google search for it can give you exact steps. SELinux = Security Enhanced Linux and adds additional security to your system. Unfortunately I've not seen a good document on how to manage it so usually just disable it as it appears most people do.
 
Old 01-12-2007, 05:14 PM   #8
ianq
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Original Poster
Rep: Reputation: 0
Thank you jlightner and all

Will google for SELinux and see what happens.

Btw, changing the user passwd using the RH User Manager does not help. I think that change is local to Server and not the MIS. What i did was "yppasswd userid" to change the NIS passwd and everything comes to normal. That is, user can login from Linux client Pc.

Log in as root but still cannot mkdir in /home.

But i did something terribly wrong. I was trying to change the permission for all the subdirectories in "/home/reports/local/may" to 777. I cd /home/reports, and chmod -r .* which removes the read permission from /home/. d-wx-wx-wx /home. I am suppose to do this chmod 777 -R .* but miss out the 777

Could some one tell me how to change the permission back ?

Thanks
 
Old 01-13-2007, 09:55 AM   #9
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Don't ever do ".*"!!!

.* will find . which is the current directory and worse yet .. which is the parent of the current directory.

If you want to change all your . files do .[a-z]* That way it will find only the files that have a letter after the . so won't find . or ..

I notice you still haven't put the output of getfacl of df -h here. Is there some reason to keep that information secret?
 
Old 01-13-2007, 12:54 PM   #10
ianq
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Original Poster
Rep: Reputation: 0
Nope nothing secret except that school is close for the weekend. I an only access on Monday morning.

I will do the getfacl of df -h /home for you when i get to school.

But in the meantime, can you please tell me how to revert the mistake i made on /home/reports by doing chmod -r .* instead of chmod 777 -R /home/reports. I need to normalise the /home/reports on Monday so that the user can access his project works. I know i had made a terrible mistake. So help me.

Thanks.
 
Old 01-15-2007, 12:07 AM   #11
ianq
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Original Poster
Rep: Reputation: 0
[root@tcadappsvr01 root]#
[root@tcadappsvr01 root]# getfacl /home
getfacl: Removing leading '/' from absolute path names
# file: home
# owner: root
# group: root
jlightner

user::rwx
group::r-x
other::r-x

[root@tcadappsvr01 root]#
[root@tcadappsvr01 root]# df -h /home
Filesystem Size Used Avail Use% Mounted on
172.19.23.188:/home 269G 33G 223G 13% /home
 
Old 01-15-2007, 09:40 AM   #12
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
OK. The df -h shows it IS an NFS mount from a server at IP 172.19.23.188. Your problem is likely that it wasn't exported with root permissions from there. You need to do your fix on the server at that IP address rather than the one where you ran the df. For this situation 172.19.23.188 is the "NFS server" and the you ran the df on is the "NFS client".

You can do one of two things once logged NFS server:
1) Run your useradd, mkdir, chmod, chown commands there on /home. They'll be reflected on the NFS client since it is just showing you what the NFS server has. You'd still need to add the user on the NFS client (unless you're also running NIS - try typing "ypwhich" to see if it is running).
2) Modify the /etc/exports file on the NFS server to allow root to make changes to the filesystem on the NFS client. Then do your commands on the NFS client. You can type "man exports" to see details of options for the /etc/exports file.
 
Old 02-06-2007, 12:07 AM   #13
ianq
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Original Poster
Rep: Reputation: 0
jlightner and all

As jlightner as mentioned,

1) i logon to the NFS server and able to change permission freely.
2) check /etc/exports and root was given pemission to make changes.

Would like to inform that everything is running fine now. Thanks to all who have chipped in.

Please close this, thank you.

Rgds
Ian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Marvell Yukon Network driver problems, Lilo Windows boot Problems mellowdog Slackware - Installation 7 01-25-2006 02:18 AM
Ethernet Adsl Modem Driver Problems And Install Problems... akhilnair Linux - Hardware 12 11-28-2004 08:19 AM
cisco 350 wireless problems and suse x-server problems incognito9 Linux - Wireless Networking 5 10-14-2004 07:53 AM
Problems, problems, problems. Lets start with the soundcard Kre8ive Linux - Newbie 5 08-07-2003 01:20 AM
Problems, problems, problems. Lets start with the ES 1868 AudioDrive Kre8ive Linux - Newbie 1 08-06-2003 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration