Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
Well what did you change and have you tried to revert back? Can you post your config files here or permissions, etc? More details, we can't guess what you did to mess things up...
Originally posted by trickykid Well what did you change and have you tried to revert back? Can you post your config files here or permissions, etc? More details, we can't guess what you did to mess things up...
I changed the permissions on the /etc folder so only root could read write alter etc, and also aplied that to all sub dir and files. (what it was before can't rem) That caused loads of problems, so i then changed it all back so root and group could read write alter etc. That of course made things worse, the ssh server shut down for security violations (obviously) and a few other errors. By trial and error, i have managed to get most things working again except that only root can now use ssh. I even tried setting up a new user, but newuser can't use ssh either. I guess i need to know the correct permissions for ssh, pam, and anything else thats involved. A bloody mess eh?
/me/looks for an embarassed smilie
Warning: running this will reset ALL permissions. It depends on having an rpm database (hope I guessed right you're using Mandy): "rpm --setperms -qa". If you are running Aide you could do:
"zcat aide.db|egrep -ve "^(#|@)"|while read l; do l=( ${l} )
chmod ${l[2]} ${l[0]}; chown ${l[4]}:${l[5]} ${l[0]}; done"
but note this will barf on spaces in names.
In other cases you hope perms are stored and can be retrieved from whatever your package/backup manager provides or you'll have to restore from cdr/mirror.
Originally posted by unSpawn
[B]Warning: running this will reset ALL permissions. It depends on having an rpm database (hope I guessed right you're using Mandy): "rpm --setperms -qa".
HI,
thanks for the reply. I'm using redhat 8.00 on a server actually, i believe Mandy was MDK-9.2.
So, rpm --setperms -qa will reset them to before i made changes, or when all the RPMs were installed?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.