1758283 Members
2307 Online
108868 Solutions
New Discussion юеВ

BACKUP ROOT ID

 
Omprakash_2
Frequent Advisor

BACKUP ROOT ID

Hi,

I have created backup root ID in Hp ux 11.11, I am normally used to go root by providing the #su command. But here i want root access without #su command. That is if am entering login: xxxxxx
Password: 8888888

It should show # prompt, without entering #su command. Request you to provide me the solution, Thanks in Advance.
14 REPLIES 14
avizen9
Esteemed Contributor

Re: BACKUP ROOT ID

Hello Omprakash,
you can set owner and group ID for xxxxxx user simillir as root in /etc/password file, its then indirectly as root user. let me know.
Dennis Handly
Acclaimed Contributor

Re: BACKUP ROOT ID

>I have created backup root ID

What steps did you do? Or are you asking how to do it?
Omprakash_2
Frequent Advisor

Re: BACKUP ROOT ID

Hi,

I have created through SAM and provided the uid as "0". Then i tried to login but its shows incorrect password, then i tried to login to my account(Normal user account) and i provide #su XXXXX , now i can able to access the system as root. My requirement is i dont want to put #su XXXXX command to access root.

I already checked the /etc/passwd file.
avizen9
Esteemed Contributor

Re: BACKUP ROOT ID

HI,
have you also verify the group id? you can put group id same as root,

if your password is not working, please vi /etc/passwd file and remove password string for this user (keep it blank) and then on command prompt set new password with passwd command, let me know, thanks,
Suraj K Sankari
Honored Contributor

Re: BACKUP ROOT ID

Hi,

just open your /etc/passwd file into vi
edit 2 things

1.uid make it 0
2.gid make it 0

see the example

suraj:x:0:0:SA:/home/suraj:/bin/bash

logout and again loggin

Suraj
Avinash20
Honored Contributor

Re: BACKUP ROOT ID

"I have created through SAM and provided the uid as "0". Then i tried to login but its shows incorrect password, then i tried to login to my account(Normal user account) and i provide #su XXXXX , now i can able to access the system as root. My requirement is i dont want to put #su XXXXX command to access root."

1. It needs to be su - XXXX so that the profile of the user gets executed.

2. Also since I believe you are able to execute all the root command, could you confirm the same via

# whoami
>> This should display root.

If yes, then the question is why it shows login incorrect ?

Are you able to login via root user directly ?

"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Dennis Handly
Acclaimed Contributor

Re: BACKUP ROOT ID

>I have created through SAM and provided the uid as "0". Then I tried to login but it shows incorrect password

What password did you assign, the same as you tried? You didn't use @ or # did you? (These are generally verboten.)

>My requirement is I don't want to put #su XXXXX command to access root.

Then you need to know the password, that you had to use when you used "su XXXXX" from a non-root user.

>Avinash: could you confirm the same via whoami

Another command would be id(1).
James R. Ferguson
Acclaimed Contributor

Re: BACKUP ROOT ID

Hi:

Do yourself and your company a big favor. Abandon your attempts to duplicate the 'root' account (which as noted, is any uid=0).

Aside from weakening your system's security, someone, one day, might decide to remove the account and any files owned by it. Then, by example, assuming that the user is named "omprakash" do:

# find / -user omprakash -exec rm -rf {} +

...they have just removed everything owned by _root_ since "omprakash' is also uid=0.

Regards!

...JRF...
OldSchool
Honored Contributor

Re: BACKUP ROOT ID

"...someone, one day, might decide to remove the account and any files owned by it...."

Right. Auditors will ding you as well, plus selecting the incorrect option when removing the user in SAM can smoke the files as well I believe.

There are numerous threads here describing this issue.

"You have been warned"