cant log into root/missing root files

Briefly describe your issue below:
hello,
ok sorry about this im still a noob in linux,
im running parrotsec 4.2.2 amd 64, on a i7 x230 16gb ram,
IDK about method to install, originally USB, recently apt-get update
it is not a multi-boot, Parrot is my only OS
i have been locked out of root for a couple months, recently tried to reset the pass w/ init=/bin/bash/, it never worked, then i realized in /home i have tj (my daily use) root (with 0 files) and roo with 7 files, desktop Mozilla, .local, .config, templates, .profile, .bashrc. thats it.
obviously i screwed something up, is this fixable without doing a complete reinstall?
my main account (tj) works fine, and since i dont know the passwords (i actually do, they arent working) is there a simple way out?
your help/time is greatly appreciated!

love the distro! keep up the awesomme work!\

Try

i have tried that, but i did again. it successfully changed the password, so i logged out, and tried to log in, no luck. FYI i tried on both root and roo. nothing.
i have followed instruction for forgotten root pass for debain stretch as well, thats where the init=/bin/bash/, after editing the boot info as described, no luck there either.
can i delete the root user, then add it again, set the pass, and solve it like that?
and i do use sudo when changing things, but whats the difference between su/sudo, su is only good for 1 use at a time? is that correct?
thanks for taking the time to try to help me!

and to clarify, for example if i run, under my daily account (tj), $ sudo apt-get update, it asks for my pass or , (sudo) password for tj; that it accepts.
if i wanna change permissions on a file, or usb drive-its not having it.
Ive even double checked control panel/users/root/group permissions (both root & roo actually).
if my daily account tj, was also given root privileges in groups-would that cause an issue?
are 2 users allowed root access?

and to clarify again, changing the permission on flies/usb, im referring to things created in root, with special permissions-when it was working

Ok so when you use sudo in the terminal it grants root permissions to whatever command you run after it. The sudo password will last in the terminal for a set amount of time, so you dont have to repeatedly type it in (you still have to append sudo to the command).

root is a user with root permissions all the time, so anything you run will be run as root. That is why it isnt recommended for security reasons. Its also a pain if you create files under root, as other users wont be able to write them without changing the file permissions (this might be your problem).

You already are in a group with root permissions thats what sudo is.
cat /etc/group | grep tj will show you the groups you are in (one of which should be sudo).

If you use sudo visudo it will open your sudoers file. It will show you the root user and its permissions, as well as the sudo groups permissions (note they are the same).

You should be able to log into root at the initial log in screen. Or using su - root that will log you into root in that terminal, you can then use exit or su - tj to log back in as your user.

This is how it should work out the box. If some of this stuff doesnt work then you might have messed something up with permissions, a re-install will be easiest if you cant remember what you changed. If this explanation doesnt help solve your problem, reply with exactly what you are trying to do and we will see if we can get it working.

ok, so if i use su - root, i can log into root
but if i use the logout/switch users from the panel, i can not log into root.
one of my isssues is trying to remove some locked files on usb drives, that i put there under root user as i have a bad tendency to delete personal pictures, encryption keys, and other important stuff, i have tried to change the permissions in the terminal, w/ the 777 thing, im guessing it would probably work if i enter root 1st.
but also i have the user roo, which i assume is root w/ a type, and root missing tons of files, can i delete both, and then create a root user again, assign a password, and be normal-on the computer at least? or would that just screw everything up?
also am i correct in thinking the main premise of your response the user tj-was already root?
i believe i changed the groups for that user giving root access, after issues with root. am i correct in thinking oi could change permissions on usb even though it was also root, but because the user names were different?
im kinda under the impression root permissions are for everything, but is that different by default for root, and all other users?
thanks for taking the time to help me out, i really appreciate it!

I think you are making things difficult for yourself here.

You should really be using sudo instead of root. Is there any reason you cant use sudo?

Running sudo chmod 777 /file/path/example.txt on the file will allow different users ‘read’, ‘write’ and/or ‘execute’ permissions on the file.
1st digit after chmod represents owner permissions
2nd is owners group permissions
3rd is other permissions
0 = No permissions
1 = Execute permissions
2 = Read permissions
4 = Write permissions
So you add up the numbers you want to make up the permissions for each user/group/other.

Dont know who ‘roo’ is i think you might have created him by mistake.

You probably wont be able to delete root (Im not going to try) and you wouldnt want to. Lots of system processes run under root (ps aux | grep root to see them) and you would kill all those processes in doing so. Most likely rendering your system useless.

Your user tj isnt root. But he can access root permissions via sudo. So if you encounter a error that says ‘Permission denied’ or ‘This needs to be run as root’ or something to that effect then append sudo to the front of the command, it will give your user root permissions for that command/process. Using your locked files as an example you could do sudo rm /locked/file.txt.

root is a user with full permissions. As default other users (like ‘tj’) dont have the same permissions, this is for security and to make them less likely to break something. But they can use sudo to get those permissions for one off tasks.

Depending on the filesystem of your USB it might not support individual file permissions and you simply might not have mounted the filesystem with write permissions.

Im also not sure what you mean when you say ‘root missing tons of files’.

hello brother !
he have same problem of me
in the old parrot versions there’s a choice to login into root account when start the system or switch between usual account and root account
but in this new version can’t find login as root when start the system just we find our usual account even after do that “sudo passwd root” and writing the root password
it stay same when restaring system we don’t find root account except the usual account

sudo -i

?

yes brother but we don’t meant sudo -i

i want exactly loggin into root account directly
desktop of root user
when you click on system then logout “youraccount” then you click switch account you find only one account that is usual one

i want the option like kali linux logging into root user directly not from terminal but from logging when start system

the old version of parrot had this option but this last one i search a lot and i did’nt find it

They removed that option
only way now is on terminal.
Read the documentation here: https://docs.parrotlinux.org/faq/#how-do-i-upgrade-my-system

1 Like