cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4841
Views
5
Helpful
6
Replies

Root Privileges in PI 3.1

MUQ_1899_
Level 1
Level 1

Hello,

Until PI 3.1 root access to the Linux shell was permitted by default. Now in PI 3.1 it is not. Is there any way to gain root privileges to this shell?

1 Accepted Solution

Accepted Solutions

 - What about my original suggestion :

      # sudo -s

(without any further parameters!). Further more , it only works if you logon with the default admin account onto prime. The gotcha is that if you use a none-admin account-(name) it won't work (indeed).

M.



-- ' 'Good body every evening' ' this sentence was once spotted on a logo at the entrance of a Weight Watchers Club !

View solution in original post

6 Replies 6

Marvin Rhoads
Hall of Fame
Hall of Fame

You can no longer "su" to become root. However they do allow you to "sudo" to perform commands requiring escalated privilege.

For example:

ade # ls -al
ls: cannot open directory .: Permission denied
ade # sudo ls -al
total 84
dr-xr-x---. 6 root root 4096 Jul 19 11:07 .
dr-xr-xr-x. 30 root root 4096 Jul 19 11:14 ..
drwxrwxr-x. 4 root root 4096 Jun 3 17:09 .matlab
drwxr-xr-x. 2 root root 4096 Jun 3 14:19 .oracle_jre_usage
-rw-------. 1 root root 8294 Jun 3 17:14 anaconda-ks.cfg
drwxr-xr-x. 2 root root 4096 Jun 3 17:12 bin
-rw-r--r--. 1 root root 18977 Jun 3 17:14 install.log
-rw-r--r--. 1 root root 5646 Jun 3 17:12 install.log.syslog
-rw-------. 1 root root 381 Jun 3 17:15 ks-post-toinstall.log
-rw-------. 1 root root 202 Jun 3 17:15 ks-post.log
drwxr-xr-x. 2 root root 4096 Jun 5 01:45 logs
-rw-r--r--. 1 root root 5 Jun 3 17:15 ova.ks.cfg
-rw-rw-r--. 1 root root 80 Jul 19 11:17 test.log
ade #

ade # sudo vi script.sh
[sudo] password for bob:
Sorry, try again.
[sudo] password for bob:
bob is not in the sudoers file. This incident will be reported.

ade # sudo -s bob
[sudo] password for bob:
bob is not in the sudoers file. This incident will be reported.

This is happening when I try to execute a command with super user privs.

 - What about my original suggestion :

      # sudo -s

(without any further parameters!). Further more , it only works if you logon with the default admin account onto prime. The gotcha is that if you use a none-admin account-(name) it won't work (indeed).

M.



-- ' 'Good body every evening' ' this sentence was once spotted on a logo at the entrance of a Weight Watchers Club !

That worked. :)


@marce1000 wrote:

 

 - What about my original suggestion :

 

      # sudo -s

 

(without any further parameters!). Further more , it only works if you logon with the default admin account onto prime. The gotcha is that if you use a none-admin account-(name) it won't work (indeed).

M.


If default “admin” account was not created at installation time, then create it while logged in as your alternate admin account.

 

host/sysadmin# conf t
host/sysadmin(config)# username admin password plain PASSWORDNEW role admin
host/sysadmin(config)# exit
host/sysadmin#

marce1000
VIP
VIP

 - Provided the default admin account is being used for initial logon :

            # sudo -s

Should give  you a root shell

M.



-- ' 'Good body every evening' ' this sentence was once spotted on a logo at the entrance of a Weight Watchers Club !