Linux - SoftwareThis 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
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?
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.
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.
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.
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.
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 ?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.