HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

sudo su - after login

 
kgpenator
Advisor

sudo su - after login

Hi All,

I want to execute the command "sudo su -" after login to the user account.How could i do this?

2 REPLIES
Patrick Wallek
Honored Contributor

Re: sudo su - after login

Type it in at the $ prompt.

 

If you mean you want to execute it automatically, it could be done but I would really question why you want to do this.

 

If you really want to do this just add it to your .profile file in your home directory.

Yogesh-Puranik
Occasional Advisor

Re: sudo su - after login

 

1]You have to make sure that your name is present under /etc/sudoers file by root.

 

2] If user is present under sudoers file then,follow below steps,

 

Ex.Your name is test (normal user)

Login : test

Passwd:xxxx

User is loged in

$sudo su - test

passwd:xxxx

$su -

Now you are superuser.

 

regards,

Yogesh