LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   su - "Sorry." (https://www.linuxquestions.org/questions/slackware-14/su-sorry-819733/)

lucmove 07-14-2010 03:03 AM

su - "Sorry."
 
I just logged in to my remote shell account like I always do: as an ordinary user, because root login is disabled in sshd. Then I may want to become root with the 'su -' command.

But the 'su -' command did not work today. Every time I tried, I got this laconic message: "Sorry."

Note that I wasn't even given a chance to enter the password. Just 'su -', Return, "Sorry."

I logged in to the service host control panel and rebooted the system. I can su - and be root again.

Fine, but... What happened?!! I searched Google and only found reports of people who at least were given the chance to enter the password.

mutexe 07-14-2010 04:09 AM

Might sound silly, but maybe a sticky key?

samac 07-14-2010 01:41 PM

Is your user a member of the group "wheel"?

samac

mostlyharmless 07-14-2010 02:07 PM

I never login remotely, so I can't test it, but I know that there's an option (somewhere) to disallow root logins from anywhere but console. See for example:

http://www.linuxquestions.org/questi...ssible-624540/

(from "disable remote root login" in google)

lucmove 07-14-2010 04:15 PM

Thank you for the attention, but the replies I am getting here don't make a lot of sense.

A sticky key? No, the problem went away as soon as the VM was rebooted.

The user is not a member of the "wheel" group, but I said I log in as user then escalate to root with 'su ' all the time. That didn't work all of a sudden. Then the problem went away after a reboot. This doesn't seem to have anything to do with permissions.

Root login is disallowed, I said that myself in the original post. But I've always been able to become root with 'su -'.

mostlyharmless 07-14-2010 04:32 PM

Sorry I missed that part, I'll try to be more careful reading; well hmm, was there an update of ssh recently? Change in config files?

I guess if the problem went away after a reboot, well then problem solved... weird though..

kd5zex 07-26-2010 05:18 PM

I am having the same issue as the OP. A reboot fixed it for a day or so but it has stated happening again. It seemed to start after installing and configuring mysql.

Also, I have getting this error when I try to do a man. The two issues are occurring together and seem to be related.

Code:

$ man man
Error executing formatting or display command.
System command (cd "/usr/man" && (echo ".ll 12.7i"; echo ".nr LL 12.7i"; echo ".pl 1100i"; /bin/gunzip -c '/usr/man/man1/man.1.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -mandoc | /usr/bin/less -is) exited with status 256.
No manual entry for man

I see the man page come up for a moment before it gives that error.

SaintDanBert 07-26-2010 07:31 PM

I used to use su - all of the time. I have since started using sudo -i instead. The option "-i" asks that sudo simulate a user login. After authentication, you get a shell prompt with root permissions. Use CTRL-D or logout to end the login shell. The security advantages of sudo far outweigh any other convenience. Most useful to me, is the logfile that I can use to discover what I did if something goes awry.

Most of the su and sudo problems I've had can be traced to two families of details:
  • contents of the respective configuration files [url[/etc/sudoers[/url]
  • permissions of various files and folders that the commands encounter in the respective $HOME folders as well as the configuration files
Command configuration requires whatever it does and those rules are pretty specific and well documented. Little differences can create large changes in behavior.

Both su and sudo carefully guard the permissions of controlling files to prevent unwanted tinkering to gain or alter configured access.

~~~ 0;-Dan

lucmove 07-27-2010 09:52 PM

Quote:

Originally Posted by kd5zex (Post 4046229)
I am having the same issue as the OP. A reboot fixed it for a day or so but it has stated happening again. It seemed to start after installing and configuring mysql.

Also, I have getting this error when I try to do a man. The two issues are occurring together and seem to be related.

I am the original poster. For whatever it's worth, the problem only occurred to me once, I never had the problem with 'man' and I don't have mysql. Not that it helps with anything, but I thought I should say it.


All times are GMT -5. The time now is 01:39 PM.