Koozali.org: home of the SME Server

su to root doesn´t work anymore

Offline DeMan

  • **
  • 22
  • +0/-0
su to root doesn´t work anymore
« on: December 30, 2009, 11:19:19 AM »
Hi,

I´ve several SME servers running but on one server no accounts can´t become root!

I followed the instructions on your site: http://wiki.contribs.org/SME_Server:Documentation:FAQ#Shell_Access

BTW on my other SME server su is working perfect.

/sbin/e-smith/db accounts show sysadmin
sysadmin=user
    City=xxx
    Company=xxx
    Dept=xx
    EmailForward=forward
    FirstName=System
    ForwardAddress=xxx
    FreeBusy=
    LastName=Administrator
    PasswordSet=yes
    Phone=
    Shell=/bin/bash
    Street=xxx
    Uid=5000
    VPNClientAccess=no

Logon example for sysadmin:

-bash-3.00$ su
Password:
-bash-3.00$

... nothing is happening!

Please advice....

Kind regards,

Bob

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: su to root doesn´t work anymore
« Reply #1 on: December 30, 2009, 11:23:31 AM »
Analyse the logfiles, start with /var/log/messages for clues.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline DeMan

  • **
  • 22
  • +0/-0
Re: su to root doesn´t work anymore
« Reply #2 on: December 30, 2009, 11:37:10 AM »
I already did... no clues in here.

Dec 30 11:35:59 ns4 sshd(pam_unix)[5526]: session opened for user sysadmin by (uid=0)
Dec 30 11:36:05 ns4 su(pam_unix)[5560]: session opened for user root by sysadmin(uid=5000)
Dec 30 11:36:05 ns4 rssh[5566]: setting log facility to LOG_USER
Dec 30 11:36:05 ns4 rssh[5566]: setting umask to 022
Dec 30 11:36:05 ns4 rssh[5566]: user root attempted to log in with a shell
Dec 30 11:36:05 ns4 su(pam_unix)[5560]: session closed for user root

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: su to root doesn´t work anymore
« Reply #3 on: December 30, 2009, 12:01:36 PM »
I already did... no clues in here.
Strange... I have no clue either but in my case (using remoteuseraccess contrib) it looks like this in the logs:
Code: [Select]
Dec 30 12:02:33 homer sshd(pam_unix)[7694]: session opened for user jonathan by (uid=0)
Dec 30 12:02:59 homer sshd(pam_unix)[7694]: session closed for user jonathan
« Last Edit: December 30, 2009, 12:04:50 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: su to root doesn´t work anymore
« Reply #4 on: December 30, 2009, 12:06:35 PM »
What is the output of this as root?
Code: [Select]
chsh -l
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline DeMan

  • **
  • 22
  • +0/-0
Re: su to root doesn´t work anymore
« Reply #5 on: December 30, 2009, 12:22:07 PM »
In the meantime I installed the remoteuseraccess contrib... but the result is the same.

Dec 30 12:19:08 ns4 su(pam_unix)[6883]: session opened for user root by sysadmin(uid=5000)
Dec 30 12:19:08 ns4 rssh[6884]: setting log facility to LOG_USER
Dec 30 12:19:08 ns4 rssh[6884]: setting umask to 022
Dec 30 12:19:08 ns4 rssh[6884]: user root attempted to log in with a shell
Dec 30 12:19:08 ns4 su(pam_unix)[6883]: session closed for user root

Requested info:

chsh -l
/bin/bash
/bin/bash2
/sbin/e-smith/console
/bin/csh
/bin/false
/usr/bin/rssh
/bin/sh

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: su to root doesn´t work anymore
« Reply #6 on: December 30, 2009, 12:25:30 PM »
In the meantime I installed the remoteuseraccess contrib... but the result is the same.
That is a pity.

Requested info:

Code: [Select]
chsh -l
/bin/bash
/bin/bash2
/sbin/e-smith/console
/bin/csh
/bin/false
/usr/bin/rssh
/bin/sh
So the assigned shell is installed and available. Did you already try to reset the shell to another shell or back to /bin/bash using chsh?
Why is the shell assigned to the user /bin/bash and does it seem to use rssh?

Otherwise I am out of clues...
« Last Edit: December 30, 2009, 12:27:04 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline DeMan

  • **
  • 22
  • +0/-0
Re: su to root doesn´t work anymore (SOLVED)
« Reply #7 on: December 30, 2009, 12:34:49 PM »
Indeed something went wrong with the root shell.

Solution:

chsh -s /bin/sh root
chsh -s /bin/bash root

Thank you for your devotion.

Bob

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: su to root doesn´t work anymore (SOLVED)
« Reply #8 on: December 30, 2009, 12:36:00 PM »
Indeed something went wrong with the root shell.
Attention is in the detail :-)

Thank you for your devotion.
No problem, glad you got things solved.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: su to root doesn´t work anymore (SOLVED)
« Reply #9 on: December 30, 2009, 05:16:55 PM »
Indeed something went wrong with the root shell.

Are you not curious as to why and how that came about?

Why do you want your users to become root anyway?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: su to root doesn´t work anymore (SOLVED)
« Reply #10 on: December 30, 2009, 08:57:42 PM »
Why do you want your users to become root anyway?
Judging by the username I think OP was trying to create an additional admin account.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline DeMan

  • **
  • 22
  • +0/-0
Re: su to root doesn´t work anymore
« Reply #11 on: December 31, 2009, 07:10:51 AM »
Indeed, I want to have a separate account for shell access, because admin account has a text browser as default interface.

I do a lot of configuration from the command prompt.

I´ll guess I mixed up the root and the sysadmin account will configuring the SME server.

Bob