Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: DeMan on December 30, 2009, 11:19:19 AM

Title: su to root doesn´t work anymore
Post by: DeMan 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
Title: Re: su to root doesn´t work anymore
Post by: cactus on December 30, 2009, 11:23:31 AM
Analyse the logfiles, start with /var/log/messages for clues.
Title: Re: su to root doesn´t work anymore
Post by: DeMan 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
Title: Re: su to root doesn´t work anymore
Post by: cactus 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
Title: Re: su to root doesn´t work anymore
Post by: cactus on December 30, 2009, 12:06:35 PM
What is the output of this as root?
Code: [Select]
chsh -l
Title: Re: su to root doesn´t work anymore
Post by: DeMan 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
Title: Re: su to root doesn´t work anymore
Post by: cactus 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...
Title: Re: su to root doesn´t work anymore (SOLVED)
Post by: DeMan 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
Title: Re: su to root doesn´t work anymore (SOLVED)
Post by: cactus 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.
Title: Re: su to root doesn´t work anymore (SOLVED)
Post by: CharlieBrady 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?
Title: Re: su to root doesn´t work anymore (SOLVED)
Post by: cactus 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.
Title: Re: su to root doesn´t work anymore
Post by: DeMan 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