Forum › Forums › New users › New Users and General Questions › XFCE4 error loging in after messing with /etc/passwd
- This topic has 4 replies, 2 voices, and was last updated Aug 3-11:32 am by Brian Masinick.
-
AuthorPosts
-
July 31, 2019 at 3:27 am #25184Member
Ziga
Hi everyone!
This is my first time to post a question so please be patient 🙂
I use AntiX for about 2-3 months and I learn Linux through it (I’ve had Lubuntu and LinuxMintXFCE for a few days to see how they look, also checked TinyCore, but this is way above my experience 🙂 )
Few days ago I’ve installed xfce4 (through Synaptic, checking also all the recommended stuff). I’ve managed with almost everything with the look of it but now it’s a hard nut – user permissions.
For example – qbittorrent cannot write files; can’t move/create files in spacefm; can’t save edited files in text editor; etc. etc.
It works when I log in as root or simply run the app through sudo or gksu.
So… the thought came to my mind – since there is no other user beside me, why not to make my entire profile with the root permissions? (which was a mistake ofcourse ;-p )
On some site I’ve read about /etc/passwd file… So I opened it as root, found the line with my username and changed the values fromZiga:x:1000:1000::/home/Ziga:/bin/bash
to
Ziga:x:0:0::/home/Ziga:/bin/bash
.
The result is almost what I expected (LoL). I’ve got the root permission EVERYWHERE… That means, that if I want to launch chromium i need to add flag ‘ –no-sandbox ‘. Can’t run VLC properly – only in CLI and a lot’s of more such mud.
I’ve tried to restore the values back to 1000:1000 (perhaps it was other value? I don’t know, because I didn’t make backup – stupid), but the effect is that when I try to log in it sends me back to slim manager. Setting the values to 0:0 let’s me to log in, but that’s not satisfying. Of course it all refers to xfce – other sessions – e.g. spaceIceWM works just fine regardless the values are 0 or 1000.Of course there is a way to create a new account and configure it from scratch, but i am a demanding learner – mistakes are the best to teach 🙂
Thanks to everyone for your time and knowledge.
July 31, 2019 at 2:21 pm #25213Moderator
Brian Masinick
::When you change user information it is important to change the file and directory rights for everything in the directory tree used by the user account.
If you changed ziga account details then you will have to make the changes from root. Use su or sudo to gain root access.
Then run the command:
chown -R ziga /home/ziga
You can change the group ID using a GID after the UID:
chown -R riga:riga /home/riga
where the user, group and directory all use the me riga.
--
Brian MasinickAugust 3, 2019 at 12:53 am #25282MemberZiga
::Thanks, that’s helpful.
But still I don’t understand why it wouldn’t go back to normal after setting back the 1000 in passwd. Something had to change automatically elsewhere.
And what does the 1000:1000 mean – one of it seems to me to be the group ID.August 3, 2019 at 11:30 am #25286Moderator
Brian Masinick
::Thanks, that’s helpful.
But still I don’t understand why it wouldn’t go back to normal after setting back the 1000 in passwd. Something had to change automatically elsewhere.
And what does the 1000:1000 mean – one of it seems to me to be the group ID.Both 1000:1000 represent the ID – UID:GID. The first 1000 is the user ID number and the second 1000 is a group ID number.
--
Brian MasinickAugust 3, 2019 at 11:32 am #25289Moderator
Brian Masinick
::UID (User Identifier) and GID (Group Identifier) | Linux – reference: https://geek-university.com/linux/uid-user-identifier-gid-group-identifier/
--
Brian Masinick -
AuthorPosts
- You must be logged in to reply to this topic.