You are not logged in.
Pages: 1
how can I give myself rights so that I can change and delete files that for some reason are not available to me? I need to delete one file that I am not allowed to delete, I apologize for the possibly stupid question
Offline
What are the current ownership and access permissions for that file? What have you tried so far?
Offline
that question hints you're new to linux (or modern computing in general) - Arch maybe not the best distro for you to start learning
Offline
I need to delete one file that I am not allowed to delete
Leaving aside competency questions, that sounds like an https://en.wikipedia.org/wiki/XY_problem and potential for desaster.
What file do you "need" to delete and why don't you control the path it resides in?
If the answer starts w/ "/sys/…" or "/proc/…" or "/dev/…" you can abandon that approach immediately and if you don't have root access to the system but would like to delete /etc/shadow while the system admin emphatically disagrees, we're not helping you with criminal efforts.
Offline
would like to delete /etc/shadow
is that even possible?
isn't shadow one of those files even root has only somewhat limited access to as it's protected by the kernel?
Offline
seth wrote:would like to delete /etc/shadow
is that even possible?
# rm /etc/shadow
rm: remove regular file '/etc/shadow'? y
removed '/etc/shadow'
# stat /etc/shadow
stat: cannot statx '/etc/shadow': No such file or directory
1#Seems fine.
EDIT: it won't let me login again though, for obvious reasons.
Last edited by Head_on_a_Stick (2024-08-08 12:40:23)
Jin, Jîyan, Azadî
Offline
EDIT: it won't let me login again though, for obvious reasons.
You'll have to reboot in single user mode … (or restore it from the open root shell)
@cryptearth, what kernel how and why?
You could theoretically safe-guard specific files in the filesystem but if the root is allowed to randomly write the file, what's the point of that? You could obviously just blank it, achieves the same.
Offline
Pages: 1