DbAppWeb.com

Menu
  • Home
  • Linux
  • HP-UX
  • macOS
  • Windows
  • Web Servers
  • App Servers
  • Storage

su: Sorry in HP-UX while switching from normal user to root user

October 10, 2017 DbAppWeb Admin

Problem:

I have an HP-UX 11.31 server, for hardening and securing the server I have disabled the root login on this server.

How to Disable Root SHH Login in HP-UX?

But after disabling the root login, I was not able to switch to the root user. I was able to log in as a normal user but when I was trying to switch to root user it is showing the error “su: Sorry” as shown below.

login as: dbappweb
Password:
Last successful login: Thu Aug 31 12:32:41 IST 2017 172.10.10.11
$
$ su - root
Password:
su: Sorry

Reason:

When we create a user using the command useradd command without using any parameter then the user is created with the sh shell which you can see in the password file /etc/passwd as shown below:

# useradd dbappweb

$ cat /etc/passwd
.
.
dbappweb:x:112:20::/home/dbappweb:/sbin/sh
.
.

Solution:

To resolve the above issue first I deleted the user dbappweb and created the same user again by using the command given below. Now we can see that in the password file /etc/passwd that user-created with ksh shell.

# userdel dbappweb

# useradd -g users -m -k /etc/skel -s /usr/bin/ksh dbappweb

$ cat /etc/passwd
.
.
sonu:x:112:20::/home/dbappweb:/usr/bin/ksh
.
.

Now we can successfully switch from normal user dbappweb to root user as shown below.

login as: dbappweb
Password:

$ su - root
Password:

Value of TERM has been set to "xterm".
WARNING: YOU ARE SUPERUSER !!

#

 

Related Posts

  • How to Find NIC (Network Interface Card) Details in HP-UX
  • How to Install a .depot Package Using swinstall on HP-UX
  • HP-UX: How to restrict NFS share access to a particular server?
  • crontab: you are not authorized to use cron. Sorry. in HP-UX
  • HP-UX: SSH taking too much time after adding the DNS Servers
  • How to add DNS servers on an HP-UX server
  • How to login to vPar console in HP-UX
  • How to extend the size of Logical Volume (LV) in HP-UX
  • How to determine file system type in HP-UX using command
  • How to check vPar machines status in HP-UX
  • How to find HBA cards/ports and WWN Number details in HP-UX (nPar)
  • How to find HBA cards/ports and WWN Number details in HP-UX (vPar)
  • HP-UX command to get Physical Memory Information
  • HP-UX command to get Processor Information
  • HP-UX command to get Hardware Serial Number
  • su: Sorry in HP-UX while switching from normal user to root user
  • SSH login taking too much time on HP-UX 11.31
  • How to Disable Root SHH Login in HP-UX?
  • hpvmstatus: HPVM currently not running.
  • How to view/print routing table in HP-UX?
  • Create a Logical Volume larger than 2TB and format it in HP-UX
  • Protect SSH Logins with SSH and MOTD Banner Messages in HP-UX
  • Remove welcome message after login in HP-UX 11.31
  • Create a Logical Volume and format it in HP-UX
  • How to rescan new LUNs added in HP-UX 11.31
  • How to reboot a HP-UX machine?
  • How to remove File System, LV and VG in HP-UX and Linux?
  • How to remove NO_HW devices from ioscan in HP-UX without a reboot?
  • Change root user password of vpar machine in HP-UX

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
Prev Article
Next Article
Tags:HP-UX Linux SSH Sys Admin

Leave a Reply Cancel Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Popular
  • Recent

Categories

  • Android (2)
  • Blogger (16)
  • Domain and Hosting (1)
  • Hardware Issues (7)
  • HP-UX (55)
  • HPE Data Protector (9)
  • IBM Lotus Notes (2)
  • IBM WebSphere Application Server (16)
  • Internet Tips & Tricks (15)
  • iOS (8)
  • JBoss/WildFly Application Server (2)
  • Linux (76)
  • macOS (15)
  • Microsoft Windows (31)
  • News and Updates (11)
  • Oracle Database (5)
  • SSL/TLS (1)
  • Storage Servers (23)
  • Tools/Softwares (1)
  • VMware ESXi (17)
  • Web Servers (14)
  • WordPress (5)

Archives

DbAppWeb.com

Solution of Database, Application and Web Server Problems

About DbAppWeb.com

One Stop Solution for Database Server, Application Server and Web Server Problems.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

DbAppWeb on Social Media

Copyright © 2025 DbAppWeb.com
Terms and Conditions   Theme by MyThemeShop.com