Hello users and roots,
I have a question about root. I've been a debian user since potato and have always run things like apt as root. In the lastest few distributions i've been installing and using sudo as a workaround in root in order to get things done.
I'd rather not have sudo on my system.
Maybe i have not fully kept up with the release notes or something, but i can't figure out why this happens. Whenever i run something as root it does not seem to have the library acces that normal users have, it does not seem to have a correct setup to run apt-get or many applications that are meant to be run as root have problems with either time info or libraries or path access or locale info. When i use sudo as root everything is fine.
Can someone explain what is going on?
Thanks
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
what happened with root
- Hallvor
- Global Moderator
- Posts: 2044
- Joined: 2009-04-16 18:35
- Location: Kristiansand, Norway
- Has thanked: 151 times
- Been thanked: 212 times
Re: what happened with root
You need to use su - for root to add the user's environment variables and configurations, like this:
Code: Select all
$ su -
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD
- sunrat
- Administrator
- Posts: 6511
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 119 times
- Been thanked: 489 times
Re: what happened with root
the apt and apt-get commands are both in /usr/bin/ so should not need to have the environment switched to root's with "su -" . Show this command as user to make sure /usr/bin/ is in your path:
What do you see when you run by itself?:
Also if one chooses to use sudo during installation and doesn't create a root account, you can add it later by just setting a root password:
Code: Select all
echo $PATH
Code: Select all
su -
Code: Select all
sudo passwd root
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!