Operating System - HP-UX
1748256 Members
3803 Online
108760 Solutions
New Discussion

Re: 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 2
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