newpersn Posted January 22, 2019 Posted January 22, 2019 Is there a way i can allow the current user root access? (not for terminal as i know i can run the Sudo cmd) Thanks
DJ-1701 Posted January 22, 2019 Posted January 22, 2019 I think the question here is... what are you trying to do? Most things will ask for a root password when you tried to make system changes.
newpersn Posted January 22, 2019 Author Posted January 22, 2019 Just want to get access to a folder that has permissions for root only. I don’t want to mess with this server too much. But need to look at a few config files.
ComplexsysDan Posted January 22, 2019 Posted January 22, 2019 (edited) I don't know the context as it's a little bit vague. Does the directory / files need to be root owned? There are many options depending on what the files are and what you are wanting to achieve. 1- Change the directory / files owner (chown) 2- Create a group or use an existing group, add the user to that group and change the group ownership and permissions of the files/directories. The above options will require root/sudo to make the initial changes. If you can give more details i.e. what the files are for as you don't want to be changing permissions and groups unless required as it could mess up other things. More info and we should be able to give more relevant solutions. Edited January 22, 2019 by ComplexsysDan
ReBoot Posted January 23, 2019 Posted January 23, 2019 Use "sudo su" or "sudo su -" Difference is explained below. sudo su Bash is called as interactive non-login shell. So bash only executes .bashrc. You can see that after switching to root you are still in the same directory: user@host:~$ sudo su root@host:/home/user# sudo su - This time it is a login shell, so /etc/profile, .profile and .bashrc are executed and you will find yourself in root's home directory with root's environment.
powdarrmonkey Posted April 7, 2019 Posted April 7, 2019 Use "sudo su" or "sudo su -" Eww, please don't. If you have sudo, you can already get any kind of shell you like with its built-in options. (See also "sudo bash", which is another sacking offence.)
powdarrmonkey Posted April 7, 2019 Posted April 7, 2019 Is there a way i can allow the current user root access? (not for terminal as i know i can run the Sudo cmd) You mean in a graphical environment? If your other aim is to make no changes, these two are not compatible and running a desktop as root is dangerous enough anyway. sudo in a prompt is a much safer alternative.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now