Operating System - HP-UX
1751840 Members
5321 Online
108782 Solutions
New Discussion юеВ

Re: root user is unable to login, but able to login as ordinary user & did a su -

 
SOLVED
Go to solution
Srekandan CR
Occasional Advisor

root user is unable to login, but able to login as ordinary user & did a su -

Console Login: root
Password:
Login incorrect
Wait for login retry: ..
login: test
Password:
Last successful login for test: Wed Apr 22 18:24:56 IST-5:30 2009 on console
Last unsuccessful login for test: Tue Mar 31 12:06:21 2009
Your password will expire on Mon May 4 14:56:07 IST-5:30 2009
Please wait...checking for disk quotas


==========================

==> checked /etc/securetty file, console line is commented.

testdb:/#cat /etc/securetty
#console

==> checked inetd.sec file & seems to be everything is ok.
=========================================
testdb:/#cat /var/adm/inetd.sec
# @(#)B11.23_LRinetd.sec $Revision: 1.10.214.1 $ $Date: 96/10/08 13:20:06 $
#
#
# The lines in the file contain a service name, permission field and
# the Internet addresses or names of the hosts and/or networks
# allowed to use that service in the local machine.
# The form for each entry in this file is:
#
#
#
# For example:
#
# login allow 10.3-5 192.34.56.5 ahost anetwork
#
# The above entry allows the following hosts to attempt to access your system
# using rlogin:
# hosts in subnets 3 through 5 in network 10,
# the host with Internet Address of 192.34.56.5,
# the host by the name of "ahost",
# all the hosts in the network "anetwork"
#
# mountd deny 192.23.4.3
#
# The mountd entry denies host 192.23.4.3 access to the NFS rpc.mountd
# server.
#
# Hosts and network names must be official names, not aliases.
# See the inetd.sec(4) manual page for more information.
dtspc allow 127.0.0.1 loopback ignite testdb
testdb:/#

=================================

==> it is trusted system. Have a policy that password will expire every 45 days, password minimum length should be 8 characters with atleast one number & one special character.

==> After doing a su - , changed the root users password recently, but unable to login.
7 REPLIES 7
Sajjad Sahir
Honored Contributor

Re: root user is unable to login, but able to login as ordinary user & did a su -



Dear

This is due to the passwd issue, u have to reset the root passwd from co option from console.

thanks and regards

Sajjad
Mark Fenton
Esteemed Contributor
Solution

Re: root user is unable to login, but able to login as ordinary user & did a su -

per the manpage for login(1)

On a trusted system, login allows superuser to log in on the console
unless /etc/securetty exists and does not contain console.

you need to uncomment 'console' in the securetty file, or remove the file entirely to allow root to log onto the console directly.
Bill Hassell
Honored Contributor

Re: root user is unable to login, but able to login as ordinary user & did a su -

The securetty file does not recognize comments so every line is meaningful. In your case, root is only allowed to login from the device file: /dev/#console (which is the same as no login allowed by root from any connection). The same effect will be seen if you put /dev/console in the securetty file. The authentication routines will add /dev/ and now root is only allowed to login from /dev/dev/console (which doesn't exist). Remove the /etc/securetty file if you do not want to restrict root logins.


Bill Hassell, sysadmin
Avinash20
Honored Contributor

Re: root user is unable to login, but able to login as ordinary user & did a su -

# mv /etc/securetty /etc/securetty.old
# swverify \*

> Check for any permission problem in
/usr/lib/security
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash Agarkar
Valued Contributor

Re: root user is unable to login, but able to login as ordinary user & did a su -

Hi,

Their is one more option availabel to this issue.

If you system is trusted

go to below directory

/tcb/files/auth/r

do ls -ltr you will see a file name with root
make acopy of that file

do

vi root

you will see pwd word in 2 line so after "=" sign use "dw" command in vi so it will delete that word, then save the file and exit.

Then run become sudo

and run /sbin/passwd root

it will directory ask for the new passwd.

enter the new passwd..

Enjoy
Avinasha
Great Power Comes With Great Responsibility
Srekandan CR
Occasional Advisor

Re: root user is unable to login, but able to login as ordinary user & did a su -

Thank for all. The issue resolved after renaming the /etc/securetty file.
Srekandan CR
Occasional Advisor

Re: root user is unable to login, but able to login as ordinary user & did a su -

Thank for all. The issue resolved after renaming the /etc/securetty file.