Cannot su to root successfully / Cannot copy/move *.bz2 files from Sosreport
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!
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.
Cannot su to root successfully / Cannot copy/move *.bz2 files from Sosreport
When logged in as a normal, ordinary user, I type 'su', and the system prompts me for a password. I type the password, but then the system displays the message 'Login incorrect'. I know the root password as I have been able to successfully login as root from the main login screen.
I contacted Red Hat support regarding this issue; they asked me to run "sosreport" and send them the resulting sosreport file. The Linux computer is NOT connected to the Internet; it is connected within an internal network-configured system.
Anyway, I followed the steps as written and as directed via phone support WRT running the "sosreport" command. This command generated the file "sosreport-jbottiger.1886840.tar.bz2". Tried to cp and mv the file to a thumb drive, but received an error message every time (i.e., Permission denied, even after 'chmod'ding the file to '777'). Tried changing the file name and redoing the cp and mv commands--same issue. If I mv the file to another directory on the Linux computer, it's OK; but I cannot cp the file to the same directory as I had read permission errors as noted above.
My colleague says that he has done UNIX/Linux administration for over 10 years and has never seen anything like this, including the original issue of not being able to su to root.
Not on linux right now, but IIRC /bin/su is -rwsr-xr-x . "chmod u+s /bin/su" should work.
I don't know what the sosreport is, but I wouldn't put a sticky bit on anything in /tmp or any other place which is world writable.
After su-ing to root, can you copy the sosreport file?
Are you sure you have write permission to the usb drive? Type "mount" to check. Or check with creating a file on the thumbdrive with touch or whatever.
Alas, if the su problem got solved by correct /bin/su permissions, the sosreport thingy is just of academic interest.
Not on linux right now, but IIRC /bin/su is -rwsr-xr-x . "chmod u+s /bin/su" should work.
I don't know what the sosreport is, but I wouldn't put a sticky bit on anything in /tmp or any other place which is world writable.
After su-ing to root, can you copy the sosreport file?
Are you sure you have write permission to the usb drive? Type "mount" to check. Or check with creating a file on the thumbdrive with touch or whatever.
Alas, if the su problem got solved by correct /bin/su permissions, the sosreport thingy is just of academic interest.
Actually, if you look at the /tmp directory itself, the sticky bit is set. You want the sticky bit set to prevent one user from deleting another users files. It is used when a directory is world writeable, and doesn't really have much use otherwise.
About the thumb drive, if it is mounted without the permissions you need you can either right click on an automouted icon and change this behavior in the advanced properties.
You can also change the ownership and permissions using the correct options if you manually mount the pendrive.
uid=<yourusername>,gid=<yourgroup>
Also read the man mount page. You can also use fmask and dmask as well.
Can you do a <ctrl>-<alt>-<F3> and log in as "root" that way?
I have not tried that; did you mean to log in as another user, and while logged in as that user perform the <CTRL>+<ALT>+<F3> command?
Quote:
Originally Posted by PTrenholme
Are you in the sudoers file, and, if so, can you use a sudo ... command to accomplish your goals?
I'm not sure how I can be in the sudoers file, how I access it or where it is located. Are you stating that I need to be in the sudoers file to perform a sudo ... command? Could I use the sudo ... command from any directory?
Last edited by jbottiger; 01-27-2009 at 09:37 AM.
Reason: Used wrong separators
I have not tried that; did you mean to log in as another user, and while logged in as that user perform the <CTRL>+<ALT>+<F3> command?
Yes. On most system that will start a mintty session on tty3 where you can log in as, e.g., root and "do your thing."
Quote:
I'm not sure how I can be in the sudoers file, how I access it or where it is located. Are you stating that I need to be in the sudoers file to perform a sudo ... command? Could I use the sudo ... command from any directory?
The sudoers file is normally /etc/sudoers and it's used to control which users may run commands with root access. Once you're in the sudoers file you can, for example, try a sudo su - to start your root terminal session. As a "Catch 22," you must, of course, be logged in as root to view or change the /etc/sudoers file.
I looked at the existing su file; one of my colleagues suggested commenting out one of the lines (that requires a user to be in the pam_wheel.so file/list). Please find attached to this post "before and after" versions of the pam.d 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.