cancel
Showing results for 
Search instead for 
Did you mean: 

sudo su - after login

 
Highlighted
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 2
Highlighted
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.

Highlighted
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