System Administration

Re: How to login nonroot user as root user on X (CDE)

 
SOLVED
Go to solution
Davor Bira?
Frequent Advisor

How to login nonroot user as root user on X (CDE)

Hi,

I would like that nonroot user, each time when open terminal thru X, login as root automatically?
Any idea where to start?

Tnx,
Davor
8 REPLIES 8
Patrick Wallek
Honored Contributor
Solution

Re: How to login nonroot user as root user on X (CDE)

No way to do it without supplying the root password, that I know of.

Why on earth do you want do that anyway? That is a major security risk.
Davor Bira?
Frequent Advisor

Re: How to login nonroot user as root user on X (CDE)

It is just an idea. A little bit strange idea, but an idea.
Of course, it should be done without root password. At least witout nonencrypted one.
Rick Garland
Honored Contributor

Re: How to login nonroot user as root user on X (CDE)

User would have to login and then 'su -' and supply the root passwd

An option, use of sudo can allow a user to 'sudo su -' without having to supply the root passwd. (This would be configured in the sudoers file)

Davor Bira?
Frequent Advisor

Re: How to login nonroot user as root user on X (CDE)

Ok, but where to put su, to automatically start it up as root?
Stefano_65
Regular Advisor

Re: How to login nonroot user as root user on X (CDE)

you can add "su -" at the end of .profile, and at login time the first thing you have to do is to enter root passwd.
Rick Garland
Honored Contributor

Re: How to login nonroot user as root user on X (CDE)

Put the 'sudo su -' command at the end of the users .profile.

When the user logs in, this command will be executed; 'sudo su -'
Davor Bira?
Frequent Advisor

Re: How to login nonroot user as root user on X (CDE)

Ok, idea with sudo is fine, but I want to do this only with terminal thru X.
Is it possible?
Muthukumar_5
Honored Contributor

Re: How to login nonroot user as root user on X (CDE)

Yes.

Go to user account and edit .dtprofile in the users $HOME directory as,

DTSOURCEPROFILE=true

.profile will be executed in $HOME directory of that user.

su - root

If you set up sudo then it will make normal user to root user.

More way to change from normal user as,

1) expect scripting.
2) r* login setup

hth.


Easy to suggest when don't know about the problem!