Solaris10 Troubleshooting Zones : Can’t login to Zone as User

 

zlogin -l <user> <zonename>

or

zlogin -C <zonename>

Symptoms:

  1. can’t log into zone
  2. login fails as user

Steps to Follow

1. Verify syntax to command or confirm correct zone.

(1) Check the zonename where you are trying to login.

# zoneadm list -cv

(2) Log into the zone.

# zlogin <zonename>

Example:

global$ zoneadm list -cv

ID NAME STATUS PATH BRAND IP

0 global               running                                            native         shared

1 localzone          running       /zones/localzone           native         shared

global$

global$ zonename

global

global$ zlogin localzone

[Connected to zone ‘localzone’ pts/3]

Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

Note: brand and ip type are only available on Solaris 10 8/07

2. Confirm login as root and zone is running

(1) Check zone status.

# zoneadm list -cv

If the zone status is not “running”, boot the zone.

# zoneadm -z <zonename> boot

If you can’t boot the zone, please see ” troubleshooting post “

(2) Try zlogin as root.

# zlogin <zonename>

Example:

global$ zoneadm list -cv

ID NAME STATUS PATH BRAND IP

0 global               running       /                                   native        shared

localzone            installed     /zones/localzone            native        shared

global$ zoneadm -z localzone boot

global$ zoneadm list -cv

ID NAME STATUS PATH BRAND IP

0 global               running        /                                    native        shared

1 localzone          running        /zones/localzone           native        shared

global$

global$ id

uid=0(root) gid=0(root)

global$ zlogin localzone

[Connected to zone ‘localzone’ pts/3]

Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

3. Verify user exists.

If the user did not exist, you might get the following error.

global$ zlogin -l user localzone

[Connected to zone ‘localzone’ pts/3]

Login failed: unknown user ‘user’.

[Connection to zone ‘localzone’ pts/3 closed]

global$

Or if the password hasn’t been set for the user, you might get the following error.

global$ zlogin -l user localzone

[Connected to zone ‘localzone’ pts/2]

Login incorrect

[Connection to zone ‘localzone’ pts/2 closed]

global$

Then log into zone as root and check the user is existing in passwd table.

# zlogin <zonename>

zone# cat /etc/passwd | grep username

Example:

global$ id

uid=0(root) gid=0(root)

global$ zlogin localzone

[Connected to zone ‘localzone’ pts/3]

Last login: Wed Dec  5 15:10:29 on pts/3

Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

# cat /etc/passwd | grep user

# useradd -md /export/home/user user

64 blocks

# passwd user

New Password:

Re-enter new Password:

passwd: password successfully changed for user

# cat /etc/passwd | grep user

user:x:102:1::/export/home/user:/bin/sh

# cat /etc/shadow | grep user

user:IiyRf4HNPoKns:13852::::::

4. Verify password is correct

Make sure passwd ins’t locked. (*LK* means passwd is locked);

# cat /etc/shadow | grep user

user:IiyRf4HNPoKns:13852::::::

In case zone is configured as part of network, verify whether you can log into the zone as user from a  remote system or not. In this case, password is needed.

# telnet <zonename>

Login: username

Password: xxxxxxxxx

5. Run truss, Gather Explorer logs and call Sun if the problem is still persist.

# truss -alef -v all -r all -w all -o truss_zlogin.out zlogin <zonename>

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

5 Responses

  1. how to do concatination in veritas volume manager tell me steps command based?

  2. how to do network installation in solaris

  3. how to do root mirroring in vxvm?

  4. how to recover root password?

  1. July 19, 2014

    […] Solaris10 Troubleshooting Zones : Can’t login to Zone as …  […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us