Lost Admin Privileges

If it doesn't relate to Debian, but you still want to share it, please do it here

Lost Admin Privileges

Postby rojasrod » 2018-07-31 00: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
-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.
rojasrod
 
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

Postby golinux » 2018-07-31 00:27

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!
User avatar
golinux
 
Posts: 1370
Joined: 2010-12-09 00:56
Location: not a 'buntard!

Re: Lost Admin Privileges

Postby rojasrod » 2018-07-31 00:36

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.
rojasrod
 
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

Postby golinux » 2018-07-31 02:41

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
golinux
 
Posts: 1370
Joined: 2010-12-09 00:56
Location: not a 'buntard!

Re: Lost Admin Privileges

Postby GarryRicketson » 2018-07-31 03:23

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,...
User avatar
GarryRicketson
 
Posts: 4957
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Lost Admin Privileges

Postby kedaha » 2018-07-31 07:17

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.
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 2851
Joined: 2008-05-24 12:26

Re: Lost Admin Privileges

Postby rojasrod » 2018-07-31 16:49

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

Postby rojasrod » 2018-07-31 16:54

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
rojasrod
 
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

Postby GarryRicketson » 2018-07-31 17:06

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.
User avatar
GarryRicketson
 
Posts: 4957
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Lost Admin Privileges

Postby rojasrod » 2018-07-31 17:22

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
rojasrod
 
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

Postby GarryRicketson » 2018-07-31 17:58

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.
User avatar
GarryRicketson
 
Posts: 4957
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Lost Admin Privileges

Postby rojasrod » 2018-07-31 18:19

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.
rojasrod
 
Posts: 29
Joined: 2013-07-17 20:17

Re: Lost Admin Privileges

Postby GarryRicketson » 2018-07-31 19:12

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.
User avatar
GarryRicketson
 
Posts: 4957
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Lost Admin Privileges

Postby Wheelerof4te » 2018-07-31 19:55

Sounds like your filesystem privileges and/or permissions are messed up. Why, I can't tell.
User avatar
Wheelerof4te
 
Posts: 1076
Joined: 2015-08-30 20:14

Re: Lost Admin Privileges

Postby rojasrod » 2018-07-31 22:26

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
rojasrod
 
Posts: 29
Joined: 2013-07-17 20:17

Next

Return to Offtopic

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable
cron