Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Lost Admin Privileges

Off-Topic discussions about science, technology, and non Debian specific topics.
Message
Author
rojasrod
Posts: 29
Joined: 2013-07-17 20:17

Lost Admin Privileges

#1 Post by rojasrod »

Hi guys

-today I shut down computer, it was stuck shutting down, I had to leave, so I turned off power
-came back later, started computer and certain admin privileges (maybe all) were stripped from my user
-I cannot mount certain drives unless I sign in as root
-in the GUI I can no longer shut down computer: the shut down, restart, suspend and hibernate are all greyed out
-my hardware was really slow after the systemd changes, so I am running Devuan Jessie XFCE. I hope you won't send me to the Devuan forum because there is nobody there. Thanks in advance.

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Lost Admin Privileges

#2 Post by golinux »

rojasrod wrote:Hi guys

-today I shut down computer, it was stuck shutting down, I had to leave, so I turned off power
-came back later, started computer and certain admin privileges (maybe all) were stripped from my user
-I cannot mount certain drives unless I sign in as root
-in the GUI I can no longer shut down computer: the shut down, restart, suspend and hibernate are all greyed out
-my hardware was really slow after the systemd changes, so I am running Devuan Jessie XFCE. I hope you won't send me to the Devuan forum because there is nobody there. Thanks in advance.
There are plenty of people active on the devuan forum. And that's where this question belongs. If you do post there, you'll need to provide much more detailed info than you did here.
May the FORK be with you!

rojasrod
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

#3 Post by rojasrod »

thank you

I am willing to give you all the info you want, but I am not a computer scientist.
I will run any commands you want, and post the outputs.

I have posted problems in the past in the devuan forums and have not received one answer. I just tried to sign in again and their "human or robot" question doesn't even let me sign in with the correct answers.

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Lost Admin Privileges

#4 Post by golinux »

rojasrod wrote:I have posted problems in the past in the devuan forums and have not received one answer.
Not true. You only posted one issue - Brother Scanner not detected by Sane - which you marked as SOLVED.
I just tried to sign in again and their "human or robot" question doesn't even let me sign in with the correct answers.
There is a question to register at our forum but does not require a question to sign in. And there is no "human/robot" captcha.
May the FORK be with you!

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Lost Admin Privileges

#5 Post by GarryRicketson »

First off, we can not help you with problems logging in to Devuan forums, etc.
We are NOT affiliated with them in any way. Discussion about your problems with Devaun forums, and their administration, should be done by PM, (private message), We are not a support forum for Devuan Forums.
===========================================

I have not ever used Devuan, but on most Linux systems, if you still can log in as root, then you should be able to restore the permissions to the user as needed.
Based on what you say below, it sounds like you can log in as root. ?
-I cannot mount certain drives unless I sign in as root
For me, that is normal, only root can mount anything,... I keep it that way.
-in the GUI I can no longer shut down computer: the shut down, restart, suspend and hibernate are all greyed out
You say XFCE, so I assume it is the GUI, but I never use any GUI, to shutdown
a system. The exact command varies but if you look at :

Code: Select all

 man shutdown

It is usually something like

Code: Select all

shutdown -pH now 
(on linux)
On openbsd, (my system)

Code: Select all

shutdown -p now 

That is why you need to check the manual, it will show the options available for
your version of Linux. (unless the Devuan developers did not include good manual pages)
-my hardware was really slow after the systemd changes, so I am running Devuan Jessie XFCE. I hope you won't send me to the Devuan forum because there is nobody there. Thanks in advance.
This (above) , has nothing to do with the problem, would be another topic in the "off topic" forum, and last :
I have posted problems in the past in the devuan forums and have not received one answer. I just tried to sign in again and their "human or robot" question doesn't even let me sign in with the correct answers.
We can not help you on this, we have nothing to do with the Devuan forums,
and it is not clear which devuan forum you are talking about.
---snip-- have not received one answer.
If your posts were similar to this, lacking clear details , etc. It is not surprising
no one answers, as far as the captcha not working, sounds to me like you got banned, but again we can not help you on that.

=========================
Since you can log in as root, you should be able to fix this, and actually you probably do not need any forum to help you.
How to modify or add user permissions on a linux system
From one of the many results : (this is for if you want to use sudo, you don't tell us if your user was in the sudoers file, or anything, maybe you are not using that ??) I don't use a sudoers file, nor "sudo", but that is another topic.
But what about that lockout issue? There are two ways you can do this. If you've already created the user, you could issue the command:

Code: Select all

sudo passwd olivia
You will be prompted to enter and verify the new password. At this point, the user account will be unlocked and they can login.
You could also try creating a new user, using 'adduser' or 'useradd' command

Code: Select all

man adduser
Is what I would use.

Code: Select all

man useradd
Is what "adduser" uses, but you have to configure the groups, permissions, etc. manually, "adduser" uses a script that prompts you with questions, and you just type in the answers, and it does the configuration for you.
Another option might be to try reinstalling XFCE,...

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Lost Admin Privileges

#6 Post by kedaha »

First thing you should do is to run fsck
Just boot to single-user mode and login as root.
The command
fdisk -l
will list your partitions and proceed
# fsck dev/sda
or wherever your partition is.
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

rojasrod
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

#7 Post by rojasrod »

GarryRicketson wrote: For me, that is normal, only root can mount anything,... I keep it that way.
well, I guess it's a little more complicated than that. If I login to the session as root, then I can mount and decrypt. But if I am logged in as my regular user, I cannot manage to mount using sudo even though my user is in the sudoers group.

This is the disk info

Code: Select all

sudo fdisk -l
Disk /dev/sdb: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7D2381E5-56FF-4D1D-9783-F304F68AE75B

Device     Start        End    Sectors  Size Type
/dev/sdb1   2048 7814037134 7814035087  3.7T Linux filesystem
but then if I try to mount, it doesn't recognize it.

Code: Select all

rojaslee@Devuan:~$ sudo mount sbd
mount: can't find sbd in /etc/fstab
rojaslee@Devuan:~$ sudo mount sbd1
mount: can't find sbd1 in /etc/fstab
rojaslee@Devuan:~$ 

rojasrod
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

#8 Post by rojasrod »

kedaha wrote: # fsck dev/sda
or wherever your partition is.
I am not exactly sure what that would do, but here is the result of what you asked me to do.

Code: Select all

rojaslee@Devuan:~$ sudo fsck dev/sdb1
fsck from util-linux 2.25.2
Usage: fsck.ext4 [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
		[-I inode_buffer_blocks] [-P process_inode_size]
		[-l|-L bad_blocks_file] [-C fd] [-j external_journal]
		[-E extended-options] device

Emergency help:
 -p                   Automatic repair (no questions)
 -n                   Make no changes to the filesystem
 -y                   Assume "yes" to all questions
 -c                   Check for bad blocks and add them to the badblock list
 -f                   Force checking even if filesystem is marked clean
 -v                   Be verbose
 -b superblock        Use alternative superblock
 -B blocksize         Force blocksize when looking for superblock
 -j external_journal  Set location of the external journal
 -l bad_blocks_file   Add to badblocks list
 -L bad_blocks_file   Set badblocks list

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Lost Admin Privileges

#9 Post by GarryRicketson »

I am not exactly sure what that would do----snip---
Try :

Code: Select all

man fsck
It will explain what fsck does, and how to use it correctly, and yes it might fix the problem.
Also :
What does fsck do ?
and
How to use fsck

===== edited =========
It does not look like you followed this exactly:
by kedaha » 2018-07-31 01:17
First thing you should do is to run fsck
Just boot to single-user mode and login as root.
The command

Code: Select all

fdisk -l
will list your partitions and proceed

Code: Select all

# fsck dev/sda
or wherever your partition is.
Did you boot to / in "single user mode" ? If you don't understand what that means, or know how, you need to tell us.
Another option is boot with a "live device", it could be CD or USB, run 'fsck' from that, it is best to not have the drive/partition you want to check and repair mounted.

Also, maybe most important, but I just noticed, here you say:
but then if I try to mount, it doesn't recognize it.
You show that you use this command to mount:

Code: Select all

rojaslee@Devuan:~$ sudo mount sbd
mount: can't find sbd in /etc/fstab
rojaslee@Devuan:~$ sudo mount sbd1
mount: can't find sbd1 in /etc/fstab
rojaslee@Devuan:~$  
Now, I am not sure about Devuan, but on most other linux distros, and bsd's
that is not the right way to mount a device. See:

Code: Select all

man mount
It should be something like:

Code: Select all

#mount /dev/sdb1 

To start with, also you are showing "sbd", look at your "fdisk" info:

Code: Select all

sudo fdisk -l
Disk /dev/sdb 
It does not say, "sbd" it says sdb also it shows /dev/sdb , not just "sdb1".
Last edited by GarryRicketson on 2018-07-31 17:29, edited 1 time in total.

rojasrod
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

#10 Post by rojasrod »

GarryRicketson wrote: and yes it might fix the problem.
no errors were found

Code: Select all

rojaslee@Devuan:~$ sudo fsck -c
fsck from util-linux 2.25.2

rojaslee@Devuan:~$ sudo fsck -p /dev/sdb1
fsck from util-linux 2.25.2

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Lost Admin Privileges

#11 Post by GarryRicketson »

Well, looks like at least you were able to run fsck, but if there are no errors found, then you need to try something else.
I do not use Desktop Environments, so can not help much, combined with not knowing anything about Devuan, but it seems to me like trying to add a new user, and see if it works for the new user, or maybe trying to re-install XFCE, and see if the new installation works better,..
Me, I would just install a good Window Manager, and forget about a DE, they can be real headaches.
I don't know if Devuan even supports or has Window Managers in their repos,
but that is another topic , sorry
well, I guess it's a little more complicated than that. If I login to the session as root, then I can mount and decrypt.
If you are using some kind of encryption, yes , that makes it more complicated,
and it does not simplify things by not telling us what kind of encryption method, etc, are there any other details you are not telling us ?

I do not understand what the problem is really, if you can log in as root, and mount, decrypt, do what ever you want, from the CLI, then what is the problem ? Some GUI that you don't really need any way does not work ?.....
I am sorry, but I don't think I can help more on this.
XFCE does have some forums as well, if the developers of Devaun can not or will not help you, I would look at the XFCE support forums, if I used it.

rojasrod
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

#12 Post by rojasrod »

GarryRicketson wrote: Me, I would just install a good Window Manager, and forget about a DE, they can be real headaches.

and it does not simplify things by not telling us what kind of encryption method, etc, are there any other details you are not telling us ?

I do not understand what the problem is really, if you can log in as root, and mount, decrypt, do what ever you want, from the CLI, then what is the problem ? Some GUI that you don't really need any way does not work ?.....
1) like openbox for example?

2) The thing is that I am not withholding information for sport. I don't even know which information is relevant, what is needed, etc...My apologies
The encryption used is luks but no lvm

3) because if I decrypt logged in as root, and then log back in as my normal user, I can no longer see the volumes decrypted.
I don't want to do my usual work logged in as root, I have been told that this is not a wise practice.
If I am logged in as my normal user, I cannot see, read, or write files on that drive, even if it has been decrypted.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Lost Admin Privileges

#13 Post by GarryRicketson »

Well, I like openbox, so yes, that is a good example,...
I don't want to do my usual work logged in as root, I have been told that this is not a wise practice.
Yes this is true.
========
I don't know anything about using " luks", so can't help there.
But it may be use full to some one else, that does know more about that.
=========

Let's back up a little, when you mount this mysterious drive, How do you mount it ? , and To where do you mount it ?
Understood, one must either use "sudo", or be root to mount a drive or device. Obviously if root mounts the device, only root can read write to it, unless,...I am guessing on this a little, I am not sure about Devaun, or even Linux on this,...
But, what I do when I mount a usb drive, first off,
1. as a normal user , 'mkdir', in my home dir, ie: /home/parrot

Code: Select all

parrot$pwd
$/home/parrot
$mkdir usb
$su
$password:(typeinpassword)
#mount /dev/sdb1 usb 
#
#exit
$cd usb 
$pwd
$/home/parrot/usb
$ls (to see my directories,etc)
If the drive mounted correctly, and it usually does, I now see it in my file manager as well, in the "/home/parrot/usb" directory, and can open, read , write , files as needed , and as the user "parrot",...no need to be root,...
The problem is , if you mount the drive somewhere like /mnt or /media, often a normal user can not read,write to those directories,... so the key here is where are you mounting this device to ? Does a normal user have permission to read write there ?,..
There are other factors that could make a mounted device/drive unreadable by a normal user, IE: permissions on that device or drive.
Post by rojasrod » 2018-07-30 18:12
Hi guys

-today I shut down computer, it was stuck shutting down, I had to leave, so I turned off power
-came back later, started computer and certain admin privileges (maybe all) were stripped from my user
-I cannot mount certain drives unless I sign in as root
Turning off the power (pulling the plug, or power failure), is not a good thing to do, or have happen, it can cause a lot of problems, even brick your system, and any devices / drives, such as usb drives that were still mounted, or connected, I know,,,, we get a lot of power failures here, and I have literally "bricked" a few usb drives , because of a power failure, and then there was the time when the CD rom ejected the CD, the "tray" that popped out, got caught on the cable, that was for the usb drive, and unplugged it while it was mounted,... but since you seem to be able to mount,read/write these drives as root, I guess they are ok, ...
However, your system is messed up, because it was not properly shut down,
since you say "it was stuck,while shutting down",... indicates something else may have been wrong, ... Why don't you try re-installing XFCE ? or for that matter, just reinstall Devuan , and use your backups, to restore you data ?
Actually, it might be worth considering just installing a OS with better support, IE: Debian Stable , .. or if as you say here:
-my hardware was really slow after the systemd changes, so I am running Devuan Jessie XFCE. I hope you won't send me to the Devuan forum because there is nobody there. Thanks in advance.
This was a problem for me as well, when Debian 7 reached EOL, well actually some time before, but any way, I installed OpenBsd, it is very well supported, it is NOT Linux, but it is much more "unix like", then any linux distro.
It is very secure, it also is very reliable. Like I said, we get power failures here, often, and I have never had any problems, even after a power failure, all though it sometimes takes some what longer to boot, when that happens,...
I don't mean to seem like I am promoting OpenBsd, I am not, just saying, ....
The point is if you can not get the help and support you need at the Devaun forums, you really should look at a different OS, one that includes good manual pages, and has good support forums, .. ..... there are many other OS's that will work well on older hardware, and offer good support, use a search engine, you will find them.

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: Lost Admin Privileges

#14 Post by Wheelerof4te »

Sounds like your filesystem privileges and/or permissions are messed up. Why, I can't tell.

rojasrod
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

#15 Post by rojasrod »

Wheelerof4te wrote:Sounds like your filesystem privileges and/or permissions are messed up. Why, I can't tell.
yes, but not only those.
I used to be able to launch certain applications that require superuser privileges from the GUI, and now they just won't unless I launch them manually from terminal with sudo (Gparted is one example)

Also I used to be able to shutdown from GUI, now I can't

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Lost Admin Privileges

#16 Post by golinux »

I don't know why you keep posting here. The Debian folks know nothing of the backend *kit or other changes that were made in Devuan. They are summarized in the Release Notes.
Devuan != Debian and the divergence is greater with each release.
May the FORK be with you!

rojasrod
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

#17 Post by rojasrod »

Garry Ricketson. I know this forum is allergic to expressions of humanity, but let me start with a big thank you.
GarryRicketson wrote:
Let's back up a little, when you mount this mysterious drive, How do you mount it ? , and To where do you mount it ?
Understood, one must either use "sudo", or be root to mount a drive or device. Obviously if root mounts the device, only root can read write to it, unless,...I am guessing on this a little, I am not sure about Devaun, or even Linux on this,...
Usually I open the file manager Thunar, and on the left pane I click on the drive, a pop up asks me for the encryption passphrase, another popup asks for admin password (maybe in reverse order?). Very easy

GarryRicketson wrote: Does a normal user have permission to read write there ?,..
They have to have the admin password and encryption passphrase, so no.

GarryRicketson wrote: since you say "it was stuck,while shutting down",... indicates something else may have been wrong, ... Why don't you try re-installing XFCE ? or for that matter, just reinstall Devuan , and use your backups, to restore you data ?



I installed OpenBsd, it is very well supported, it is NOT Linux, but it is much more "unix like", then any linux distro.
It is very secure, it also is very reliable. Like I said, we get power failures here, often, and I have never had any problems, even after a power failure, all though it sometimes takes some what longer to boot, when that happens,...
Thanks for the suggestion. I looked at OpenBSD in the past, but the installation process seemed daunting, also the full disk encryption process. I actually would really like to try it out, but I am very busy and can't afford days of messing around with the installation manual. Debian (Devuan also) has such an AMAZING installer, and it does the full disk encryption as well.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Lost Admin Privileges

#18 Post by GarryRicketson »

Your welcome,
Ok, I just woke up, and need some coffee, also have some chores, but I was thinking about this, and wonder :

Code: Select all

-I cannot mount certain drives unless I sign in as root 
You say "certain" drives, ? Can you elaborate on this ? Are these USB drives,
or ?, and then , what about other drives, ? Were these "certain drives", mounted /plugged in, when you tried to shut down, and "pulled the plug" ?
Do other drives, I am assuming these are USB drives or sticks, but do others
mount ok when you plug them in ?
I do use thunar as a file manager myself, but not the "root thunner",... however the encryption part also is something I do not know about,...
I have a couple of portable usb drives, that were damaged, and they are not encrypted, but anyway, similar to your situation, they sometimes can not be mounted, are not seen, other times they will mount, they won't boot, even though before the damage occurred they did. I have not been able to "repair" them, other then one, just yesterday, I wiped it, and installed OpenBsd to it, it now works great, boots well, and also mounts as expected.
Any way, I need some coffee and have some chores to do,...

rojasrod
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

#19 Post by rojasrod »

GarryRicketson wrote:
You say "certain" drives, ? Can you elaborate on this ? Are these USB drives,
or ?,
No, actually this is an internal hard drive.
I have one small SSD for the OS and home, and then I have a large 3TB HDD for all the other crap that I don't need to access quite as often.
Both are encrypted, but the SSD decrypts at boot, whereas the HDD needs to be mounted and decrypted manually.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Lost Admin Privileges

#20 Post by GarryRicketson »

Ok , well I also wanted to add, I agree with golinux, I think it would be better for you to be asking about this on Devaun forum, they are more familiar with exactly how things are on Devuan,, ... also I notice here you say:
2) The thing is that I am not withholding information for sport. I don't even know which information is relevant, what is needed, etc...My apologies
The encryption used is luks but no lvm
At this point, while you can still at least access the drive as root, I strongly recommend , backing up all your data, now, not later, or "ok, but maybe I will try this first",... see this thread for more details:http://forums.debian.net/viewtopic.php? ... 02#p677992

Something went wrong when the PC was turned off, and not shut down properly, the LUKs encryption complicates things, something caused it to hang, and not shut down properly, there may be other things that start going wrong, the most important thing for you to do now is make a very good back up, that has all your important data on it. A back up of the entire system will not be any good, because it would be a back up of a broken system, but the data that is important or essential to you, that is what you need to get backed up,...
If anything goes wrong, while trying to fix the problem, and something more could go wrong, and perhaps it will not accept your password, and decrypt even as root, ...If you do manage to back up your important data, then if nothing else, it will be easy to re-install , if you feel Devaun is reliable, etc, and that is what you want, that is fine, .....

Post Reply