discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I have a problem installing GNUstep like advised on the GNUstep webs


From: address@hidden
Subject: Re: I have a problem installing GNUstep like advised on the GNUstep website
Date: Wed, 9 Oct 2024 23:23:24 +0200

Hi Greg,


I did some more research and found out this:

„What Is the Ubuntu Default Root Password in Linux? In Ubuntu Linux, the root account is locked by default, meaning there is no default root password, and direct login as root or using the 'su' command to become the root user is not possible.“  (see https://host-world.com/ubuntu-default-root-password-default-ubuntu-password-explained#:~:text=What%20Is%20the%20Ubuntu%20Default,root%20user%20is%20not%20possible. )


So this:

su -c 'echo "${USER}    ALL=(ALL:ALL) ALL" > /etc/sudoers.d/${USER}‘

from setup-linux will never work on Ubuntu since there is no root password set anyway.


I think the whole setup-linux is not needed on Ubuntu since it comes with sudo enabled after a default install.


However, I also researched on how to pass a password to sudo and created this test.sh:

————
#!/bin/bash

echo "welcome!"
read -sp 'Your password:' PASSWORD
echo $PASSWORD | sudo -S whoami
————

which prints „root“ on my Ubuntu


Does all this make sense?


Kind regards,

Lars


Am 09.10.2024 um 20:57 schrieb lars.sonchocky-helldorf@hamburg.de:

Hi Greg,


I am using ubuntu-24.04.1-desktop-amd64.iso from https://ubuntu.com/download/desktop in VirtualBox


sudo is there:

lars@Ubuntu-2404-VirtualBox:~$ sudo whoami
[sudo] password for lars: 
root
lars@Ubuntu-2404-VirtualBox:~$ 


The setup-linux script „asks“ for a password but doesn’t wait for me to enter it. It continues instead saying „su: Authentication failure“:

sudo command is already present.
Adding lars to sudoers...
Please enter the root user's password.
Password: su: Authentication failure


Kind regards,

Lars


Am 09.10.2024 um 20:24 schrieb Gregory Casamento <greg.casamento@gmail.com>:

What particular version of Ubuntu are you using?   I suspect it's missing sudo or another command needed to install.

GC

Hi dear GNUsteppers,


today I tried installing GNUstep on a fresh Ubuntu 24.04 copy.


For this I used the command found on the GNUstep website:

curl https://raw.githubusercontent.com/gnustep/tools-scripts/master/gnustep-web-install-dev | bash


However the script failed to read my password, here is the output of the script:

lars@Ubuntu-2404-VirtualBox:~$ curl https://raw.githubusercontent.com/gnustep/tools-scripts/master/gnustep-web-install-dev | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Install GNUstep

100  1863  100  1863    0     0   5909      0 --:--:-- --:--:-- --:--:--  5914
                 .:;;::::;;:           
              ..:;X@:;X@@S:t8%::.       
           .;;88tStttttttttX8%88;:     
          .:;% @tt%t;;;;;;;::;;@8X;;: 
          ;:tS;ttt;;::;::;;t; 8SX @8; 
       ..:;S@S;;t;;;:::::tX@      X  ::
       :;:S::;;;;::;:;::;%8       8 .:.
 .;:t  .:X :S::::::;;;:::tS@        X8%t
.;S8S:::.SS:;:;::;:;;;;;;%X@    ..  8 8:
 :;;  8t  %;8.::;;;:8888888X8       Xt::
 .:;X SS888;;;;;;St%.....  .        8:@:
   ;.:8 t8%;;::;;tXS .              ;8S;
   .:8@ 8t88t@::;%SS .  .          S  :.
  .:S%tt.t88@8.;St%;  .           @X%;:.
 ...:Xt;;;; X%@SXSS%          .  @ 8:; 
  ;.:St;t8t.8t :X%%:    .      %:S t:   
::S  8;t:t.;@S S:@@Xt:.  .:%8:88t%:   
:XX8@;:;8@:.X:@.;%8 X@t;;tX%%8%.:       
:X8@88 : X:..::;:t@.S:::.:::;:         
::t@8X;S;.%8;tttSSt;::..:.             
 ...:;:Xt.t@;;;::..                     
     .;tS;::   

IMPORTANT!
You must update your .ssh directory so it contains your github ssh key

Begin setup for linux
sudo command is already present.
Adding lars to sudoers...
Please enter the root user's password.
Password: su: Authentication failure
======== Create gnustep build directories ========
bash: line 44: git: command not found
bash: line 45: ./tools-scripts/clone-essential-repos: No such file or directory
================ Install Dependencies ================
bash: line 49: ./tools-scripts/install-dependencies-linux: No such file or directory
================ Build ================
bash: line 53: ./tools-scripts/build-linux: No such file or directory
================ Post Installation ================
bash: line 57: ./tools-scripts/post-install-linux: No such file or directory
Done…


It looks like the script isn’t waiting for me to enter the password. I had a look what is going on and found this script:

setup-linux:

#!/bin/sh

export USER=`whoami`
if [ ! -e /usr/bin/sudo ]; then
   echo "Installing sudo..."
   if [ -e /usr/bin/apt ]; then
      su -c "apt install sudo"
   else
      su -c "rpm install sudo"
   fi
else
   echo "sudo command is already present."
fi

if [ ! -e /etc/sudoers.d/${USER} ]; then
   echo "Adding ${USER} to sudoers..."
   echo "Please enter the root user's password."
   su -c 'echo "${USER}    ALL=(ALL:ALL) ALL" > /etc/sudoers.d/${USER}'
else
   echo "${USER} is already a member of sudo users."
fi


In this script I see the line:

echo "Please enter the root user's password.“

followed by su -c which I think needs the password.


However, the script isn’t waiting for me to enter the password. I am not that of an expert in bash, but shouldn’t be there some sort of „read“ in between both commands? Or I am missing something here?


Kind regards,

        Lars




--



reply via email to

[Prev in Thread] Current Thread [Next in Thread]