Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
My Rhythmic Crotch
Jan 13, 2011

Misogynist posted:

You just need to boot into single-user mode from your GRUB (boot loader) menu (which is not your BIOS) and reset the root password with passwd.

Get into the menu before your OS starts booting, select your operating system, type a to append startup parameters, then add the parameter single and hit Enter. You should be magically transported to a root shell.
Ah, no such luck.

broken server posted:

sulogin: cannot open password database!
poo poo.

Adbot
ADBOT LOVES YOU

Polygynous
Dec 13, 2006
welp
Instead of single you can use init=/bin/sh

You may have to mount / unmount things manually, especially be sure to at least run 'sync' before restarting.

dolicf
Sep 12, 2010
If your /etc/shadow file is hosed, save a copy of it (just in case) and make a new one. Put this in there:

root:$1$ln/kWfRE$Lw7FbAaUZe/NhnszVLhFl1:15269:0:99999:7:::

That will allow you to log in as root with the password 'password' and you might be able to rebuild a working shadow file.

E: In single user mode or a rescue environment or something.

My Rhythmic Crotch
Jan 13, 2011

/etc/shadow seems to have all the system users present and looks okay.
/etc/passwd only has my user - no root or anything else...

I can get to a console with init=/bin/sh but I cannot su at all - the system seems to have no idea who any of the users are.

Ugh, it's really late here, think I'll work on it tomorrow.

Socket Ryanist
Aug 30, 2004

hootimus posted:

I can get to a console with init=/bin/sh but I cannot su at all
Why do you need to su? You're already root

Ninja Rope
Oct 22, 2005

Wee.
BSD uses rcorder to track dependencies listed inside rc scripts (a comment at the top of the file states dependencies) to order scripts for start up and shut down. It's a simple solution but I don't believe they've added support for parallelization.

Socket Ryanist posted:

Why do you need to su? You're already root

Single user mode logs you in you as root. If you're ever unsure, the "id" command will let you know who you are.

Edit: That's for hootimus.

Longinus00
Dec 29, 2005
Ur-Quan

Ninja Rope posted:

BSD uses rcorder to track dependencies listed inside rc scripts (a comment at the top of the file states dependencies) to order scripts for start up and shut down. It's a simple solution but I don't believe they've added support for parallelization.


Single user mode logs you in you as root. If you're ever unsure, the "id" command will let you know who you are.

Edit: That's for hootimus.

A possibly easier command to remember is 'whoami'.

spankmeister
Jun 15, 2008






hootimus posted:

/etc/shadow seems to have all the system users present and looks okay.
/etc/passwd only has my user - no root or anything else...

I can get to a console with init=/bin/sh but I cannot su at all - the system seems to have no idea who any of the users are.

Ugh, it's really late here, think I'll work on it tomorrow.

Instead of running init as init, you run sh as init, and init runs as root, so your shell runs as root.


e: Generally speaking worst case scenario for not being able to boot a linux system is using a liveCD and chrooting into your system to fix poo poo. :)

descoteaux
Sep 18, 2003
I'm looking to switch to Linux for multiple hosting purposes. Its uses vary from Valve Source, Indie games, Mumble or something completely random. I'm currently using a Windows 2003 x64 VPS from nfoservers.com. They support several Linux OS servers.

Excluding Windows, they offer:

CentOS 6.0
Gentoo Linux
Ubuntu 10.04-LTS
Ubuntu 10.10
Debian Lenny
Debian Squeeze

For ease of use, stability and performance, will Ubuntu 10.10 serve me well? Otherwise, what do you suggest? Keep in mind I have zero Linux experience, but I'm still an IT nerd willing to learn. Thank you. :)

dolicf
Sep 12, 2010
Ubuntu is probably fine, but you're likely to be able to find more support (and stability) from a CentOS platform. Don't go with 6.x, though, do 5.x if you can.

E: If you go with Ubuntu, do 10.04 LTS. It'll cause less headaches in the future.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

desco posted:

For ease of use, stability and performance, will Ubuntu 10.10 serve me well? Otherwise, what do you suggest? Keep in mind I have zero Linux experience, but I'm still an IT nerd willing to learn. Thank you. :)

Traditionally you would choose CentOS, Debian Squeeze, or Ubuntu LTS. They have the longest support. I would base my decision on how much experience I have with each of them, but since you don't have any, just go with whichever one is best supported by what you plan on installing on the server. 2 years of security updates isn't going to help when you can't get your poo poo installed in the first place without jumping through a lot of hoops.

Polygynous
Dec 13, 2006
welp

hootimus posted:

/etc/shadow seems to have all the system users present and looks okay.
/etc/passwd only has my user - no root or anything else...

I think Debian keeps backups of these in /var/backups, not sure if other distros do the same.

waffle iron
Jan 16, 2004

spoon0042 posted:

I think Debian keeps backups of these in /var/backups, not sure if other distros do the same.
I think some use /etc/passwd- as a backup.

My Rhythmic Crotch
Jan 13, 2011

I feel kind of stupid. The problem seems entirely related to /etc/passwd. It looked something like:
code:
hootimus:A9Kf.l92mq0
And that was it. But I didn't know the format of /etc/passwd off the top of my head, so I didn't immediately suspect any problems. And of course when I got into the system using init, my ID was zero, but whoami failed, which confused me at first but later helped me realized what was going on.

After repairing /etc/passwd the system seems mostly back to normal. So yes, I overwrote /etc/passwd using htpasswd :arghfist::saddowns: At least I was able to correct the mistake.

Edit: Yast saves a copy of /etc/passwd as passwd.YaST2save

My Rhythmic Crotch fucked around with this message at 18:04 on Oct 23, 2011

ToxicFrog
Apr 26, 2008


dolicf posted:

Ubuntu is probably fine, but you're likely to be able to find more support (and stability) from a CentOS platform. Don't go with 6.x, though, do 5.x if you can.

E: If you go with Ubuntu, do 10.04 LTS. It'll cause less headaches in the future.

On the other hand, going with CentOS will plunge you into a waking nightmare from which there is no escape as soon as you need an even slightly esoteric or recent package installed, based on my experience.

Ubuntu 10.04 LTS is probably your best bet.

Postal
Aug 9, 2003

Don't make me go postal!

dolicf posted:

Don't go with 6.x, though, do 5.x if you can.

Just out of curiosity, why do you say this? Are there notable problems in 6? I haven't run CentOS since version 5.5.

JHVH-1
Jun 28, 2002

Postal posted:

Just out of curiosity, why do you say this? Are there notable problems in 6? I haven't run CentOS since version 5.5.

6 changed a lot of stuff, and things just don't work as expected. It might be OK if you are just using what comes with the OS.

I installed a cPanel box with 6 and had no issues because it supports it, but I have seen boxes set up manually that acted strange. Gotta disable or deal with NetworkManager and other little things.

For Valve stuff, I don't know if it is any better running it on Linux, but I guess they support it. I hear complaints from our game server devision sometimes though (but they are doing large servers with tons of instances on a machine).

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

ToxicFrog posted:

On the other hand, going with CentOS will plunge you into a waking nightmare from which there is no escape as soon as you need an even slightly esoteric or recent package installed, based on my experience.

You can usually find another repository for anything you need. RPMForge etc.

dolicf
Sep 12, 2010
Yeah, it's mostly because there are still some kinks that probably aren't worth the headache unless you have a specific need for something in 6.x.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

If you're like me and enjoy using the LXDE spin of Fedora but you want the much-improved font rendering that you see in Ubuntu, give this a shot:

http://fedoraunity.org/Members/khaytsus/improve-fonts

Basically you just add some fonts and change the font rendering over to freetype. Looks great.

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
So at work we run Solaris on the servers, Ubuntu on the desktop.

My boss is getting fed up with Solaris and it's bullshit, so we're thinking of moving some less critical stuff to Linux. The question is: which one.

I'm in the Ubuntu camp. Run the LTS, so we've got up to five years between upgrades. We've already got the infrastructure to support Ubuntu (currently CFengine, moving to Puppet) and a guy on staff who knows Ubuntu.

My coworker who is spearheading this doesn't want Ubuntu for vague reasons, so I suggested CentOS, since we're not going to bother to pay for RedHat, and CentOS is the closest to RedHat so there will be the most information on running Enterprise apps (right now we're looking at AMANDA and an RT server, but once this is off the ground, sky's the limit).

Any suggestions guys?

angrytech
Jun 26, 2009

FISHMANPET posted:

So at work we run Solaris on the servers, Ubuntu on the desktop.

My boss is getting fed up with Solaris and it's bullshit, so we're thinking of moving some less critical stuff to Linux. The question is: which one.

I'm in the Ubuntu camp. Run the LTS, so we've got up to five years between upgrades. We've already got the infrastructure to support Ubuntu (currently CFengine, moving to Puppet) and a guy on staff who knows Ubuntu.

My coworker who is spearheading this doesn't want Ubuntu for vague reasons, so I suggested CentOS, since we're not going to bother to pay for RedHat, and CentOS is the closest to RedHat so there will be the most information on running Enterprise apps (right now we're looking at AMANDA and an RT server, but once this is off the ground, sky's the limit).

Any suggestions guys?

If you're all familiar with Ubuntu, then go Ubuntu. What kind of vague reasons did your coworker give?

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams

angrytech posted:

If you're all familiar with Ubuntu, then go Ubuntu. What kind of vague reasons did your coworker give?

At first it was "security" and then he dropped that when I pointed out that LTS server is supported four 5 years. Now he doesn't really have a reason to give. I actually suggested CentOS for him to look into. I know that whatever we choose it'll involve countless meetings and endless whining from the Solaris guy, I'd just like to have an unbiased view of everything.

I'm voting for Ubuntu mostly because of familiarity, so I'm just wondering if there was any reason not to go with Ubuntu.

nitrogen
May 21, 2004

Oh, what's a 217°C difference between friends?

FISHMANPET posted:

At first it was "security" and then he dropped that when I pointed out that LTS server is supported four 5 years. Now he doesn't really have a reason to give. I actually suggested CentOS for him to look into. I know that whatever we choose it'll involve countless meetings and endless whining from the Solaris guy, I'd just like to have an unbiased view of everything.

I'm voting for Ubuntu mostly because of familiarity, so I'm just wondering if there was any reason not to go with Ubuntu.

The only reasons to go with something like redhat arent technical reasons, they are slushy feel-good reasons.

Redhat is a bigger name than Canonical. This can mean something to upper slushy management types.
I've delt with redhat support exactly three times in the 10 or so years i've dealt with linux. Each time their support was pretty dang good. It took less time to get to a knowledgable person than it took with Sun.

I've never dealt with Canonical.

In my eyes, Canonical is more of a marketing arm, while Redhat is more of an engineering arm. I have no real data to back this up, but again, it's a slushy feeling.

EDIT: To add, if you and the rest of your folks are more familliar with Bob's Linux and Bait, then thats what you should use, as long as Bob's Linux and Bait meets your needs. If you and the rest of the staff know Ubuntu best, then thats the best reason for you to use it.

EDIT EDIT: Also look at Scientific Linux instead of centos, their recent release cycle has been better.

nitrogen fucked around with this message at 05:47 on Oct 24, 2011

spankmeister
Jun 15, 2008






JHVH-1 posted:

6 changed a lot of stuff, and things just don't work as expected. It might be OK if you are just using what comes with the OS.

I installed a cPanel box with 6 and had no issues because it supports it, but I have seen boxes set up manually that acted strange. Gotta disable or deal with NetworkManager and other little things.

For Valve stuff, I don't know if it is any better running it on Linux, but I guess they support it. I hear complaints from our game server devision sometimes though (but they are doing large servers with tons of instances on a machine).

Honestly, once you get over those few little things, RHEL6 is actually kinda nice.

Just put NM_MANAGED=no in every ifcfg-ethX :v:

spankmeister fucked around with this message at 08:54 on Oct 24, 2011

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

Bob Morales posted:

Is it because those other Pages are on different ports than 80?

No, everything is serving from port 80 on the LAN, and I have NAT rules going to my public IP ports (8080, 8081, etc). I've tried serving the sites internally using the 8080-range ports and had no change in behavior.

nitrogen
May 21, 2004

Oh, what's a 217°C difference between friends?

spankmeister posted:

Honestly, once you get over those few little things, RHEL6 is actually kinda nice.

Just put NM_MANAGED=no in every ifcfg-ethX :v:

Hell, I went one step further and removed NetworkManager completely from my personal rh6 boxes.

JHVH-1
Jun 28, 2002

spankmeister posted:

Honestly, once you get over those few little things, RHEL6 is actually kinda nice.

Just put NM_MANAGED=no in every ifcfg-ethX :v:

Thats one of the first things I learned. I had battled with the drat NetworkManager a couple times on servers people just had to have Fedora installed on. The guys in our datacenter doing the OS installs though might not be so knowledgable and end up asking for help.

nescience
Jan 24, 2011

h'okay
Newbie Linux stuff:

Have a question about MySQL server, although I think it's more relevant in this thread.
I'm trying to run a private game server that uses a MySQL server for the player information, but I'm getting an Access Denied error,

quote:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /opt/lampp/htdocs/config.php on line 26
so I'm assuming I have the log in information wrong.

I tried resetting the password to my MySQL server via safemode, but during the installation of the server files, I think the installer installed another instance of a MySQL server somewhere else on my server (not in the default directory, so I didn't reset the right MySQL server/DB), and I want to find out how do I change the password on this other MySQL server.

I'm running Ubuntu Server 11.04 64bit (no GUI).

nescience fucked around with this message at 22:48 on Oct 25, 2011

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Userf4058 posted:

Newbie Linux stuff:

Have a question about MySQL server, although I think it's more relevant in this thread.
I'm trying to run a private game server that uses a MySQL server for the player information, but I'm getting an Access Denied error,

so I'm assuming I have the log in information wrong.

I tried resetting the password to my MySQL server via safemode, but during the installation of the server files, I think the installer installed another instance of a MySQL server somewhere else on my server (not in the default directory, so I didn't reset the right MySQL server/DB), and I want to find out how do I change the password on this other MySQL server.

I'm running Ubuntu Server 11.04 64bit (no GUI).

http://www.cyberciti.biz/faq/mysql-change-root-password/

nescience
Jan 24, 2011

h'okay

Yeah, tried this one, no luck =(. I don't know where this other MySQL server is installed.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Userf4058 posted:

Yeah, tried this one, no luck =(. I don't know where this other MySQL server is installed.
Can you even connect to the server with:

mysql -u root -p -h hostname_or_ip

If so, type in 'show databases;' and you should see a list of databases (they should have some for whatever game you are using or other software on the server)

Then type:

use mysql;
select user, host, password from user;

And you should see your users. You may have the username and stuff wrong, you really shouldn't have it setup to have a program connect as 'root'@'localhost'. Create a new user and give them the appropriate permissions on the database your game is using, and change the config file to use that user/password.

http://dev.mysql.com/doc/refman/5.1/en/adding-users.html

nescience
Jan 24, 2011

h'okay

Bob Morales posted:

Can you even connect to the server with:

mysql -u root -p -h hostname_or_ip

If so, type in 'show databases;' and you should see a list of databases (they should have some for whatever game you are using or other software on the server)

Then type:

use mysql;
select user, host, password from user;

And you should see your users. You may have the username and stuff wrong, you really shouldn't have it setup to have a program connect as 'root'@'localhost'. Create a new user and give them the appropriate permissions on the database your game is using, and change the config file to use that user/password.

http://dev.mysql.com/doc/refman/5.1/en/adding-users.html
When I tried to mysql -u root -p,

ERROR1045(28000): Access denied for user 'root'@'localhost' (using password:YES)

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams

Bob Morales posted:

Can you even connect to the server with:

mysql -u root -p -h hostname_or_ip

If so, type in 'show databases;' and you should see a list of databases (they should have some for whatever game you are using or other software on the server)

Then type:

use mysql;
select user, host, password from user;

And you should see your users. You may have the username and stuff wrong, you really shouldn't have it setup to have a program connect as 'root'@'localhost'. Create a new user and give them the appropriate permissions on the database your game is using, and change the config file to use that user/password.

http://dev.mysql.com/doc/refman/5.1/en/adding-users.html

Once he manages to get into the database, none of that is going to work because I'm since he can't get into the DB, he can't get his server to create the tables in the DB.

As for Userf, how did you go about resetting the password such that you think you installed another mysql instance? With Ubuntu it's really hard to install another version of a program like mysql unless you downloaded the source and compiled it yourself.

You can run
code:
ps -ef | grep mysql
to see all running instance of mysql. If you want to be thorough, you can run
code:
sudo find / -name "*mysqld*"
to find all files with mysqld (I believe that's the name of the daemon) on the server.

nescience
Jan 24, 2011

h'okay

FISHMANPET posted:

Once he manages to get into the database, none of that is going to work because I'm since he can't get into the DB, he can't get his server to create the tables in the DB.

As for Userf, how did you go about resetting the password such that you think you installed another mysql instance? With Ubuntu it's really hard to install another version of a program like mysql unless you downloaded the source and compiled it yourself.

You can run
code:
ps -ef | grep mysql
to see all running instance of mysql. If you want to be thorough, you can run
code:
sudo find / -name "*mysqld*"
to find all files with mysqld (I believe that's the name of the daemon) on the server.


with what you mentioned above, I found:

code:
/opt/lampp/bin/mysqld_safe
I understand what lampp is, but I installed LAMPP through a setup script from the server files, not from apt, so I think that's the mysql server that I need to tinker with, but I don't know how to start it. When I try to start mysql in safe mode, I get the regular one in usr/bin/mysqld_safe. (Unless I'm just completely lost and have no idea whats going on).

spankmeister
Jun 15, 2008






Userf4058 posted:

with what you mentioned above, I found:

code:
/opt/lampp/bin/mysqld_safe
I understand what lampp is, but I installed LAMPP through a setup script from the server files, not from apt, so I think that's the mysql server that I need to tinker with, but I don't know how to start it. When I try to start mysql in safe mode, I get the regular one in usr/bin/mysqld_safe. (Unless I'm just completely lost and have no idea whats going on).

So when you start the mysql_safe with the --skip-grant-tables option, you put the full path in like so:

code:
# /opt/lampp/bin/mysqld_safe --skip-grant-tables
Then continue as normal with the instructions.

descoteaux
Sep 18, 2003
dolicf
Bob Morales
ToxicFrog
Postal
JHVH-1

Thank you for your feedback and responses. I'll delve into 10.04 LTS and see how it goes. I may come crying back, but I'll give it my best newbie shot. :haw:

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

IRCnet actually has some traffic in #linux, EFnet has a little more. It seems like every web page related to IRC networks is broken, they used to have up-to-date channel lists with user counts. I also remember the busier channels being things like 'linux-hackers' or 'linuxhelp' but maybe not.

nescience
Jan 24, 2011

h'okay
got my issue resolved, thanks everyone. Learned some stuff!

Adbot
ADBOT LOVES YOU

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Userf4058 posted:

got my issue resolved, thanks everyone. Learned some stuff!

What was the solution?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply