Software :: Change From /sbin/sh To /bin/bash For 'root'?
Feb 19, 2011As I login as root, the bash is /sbin/sh. So I have problem to run script under /ect/rc3.d/myScript
So I want to change the bash from /sbin/sh to /bin/bash.
As I login as root, the bash is /sbin/sh. So I have problem to run script under /ect/rc3.d/myScript
So I want to change the bash from /sbin/sh to /bin/bash.
I just installed amanda-backup_client-2.6.0p2-1.rhel4.i386.rpm on my Red Hat Enterprise Linux 4 system. But I don't know who to check if it successfully installed or not. When I try to run amrecover from root, I get:
-bash: /usr/sbin/amrecover: cannot execute binary file
I did chmod -R g=rwx on /bin , /sbin
now I can not connect to the machine using root through telnet, ssh, scp, rsh or any means.
I'm running a server with CentOS 5 where the software that needs to run on the server uses ifconfig to verify the system IPv4.The problem is that /sbin isn't set for the user that is supposed to run the software (sadmin) which means the software can't execute ifconfig and thus terminates.now the workaround I've been using is simply to input.
View 10 Replies View RelatedI am using sda1 as /, which is a bootable drive. I do not know if my problem is that I did not create a /boot drive. After removing the iso dvd, I tried to reboot and I get this back: -bash: /sbin/reboot: input/output error Then it returns me to the terminal prompt.
View 6 Replies View RelatedLet's get clear with all bin and sbin folders(from filesystem hierarchy standard):
So the question is: Why there are so many directories and what are the meanings of /usr/sbin, /usr/local/sbin and /usr/local/bin?
Many programs are distributed through archives and we have to build them from source code. Usually they have makefile so it's quite easy. This process involves creating files in usr/local/lib, usr/local/bin... usr/local/whatever without creating specific folders for a given program.
I think it's not right because if we need to remove the program we have to manually delete every of its files if the program's creator didn't take care of it.
I created a chroot jail in /SECURITY/Jail. But when I used the command 'sudo chroot /SECURITY/Jail' to enter the fake root, I got an error message likegroups: cannot find name for group ID 105groups: cannot find name for group ID 119.
View 1 Replies View RelatedAccidentally I changed the ownership of all the directories under / to my own instead of root:root. Now I am unable to use sudo and many bad things are happening. Is there a way to revert the changes or change the permissions again to root:root or make sudo work ?
View 3 Replies View RelatedNow I know that in order to change the colors in your terminal you have to play around with ~/.bashrc But the effects don't stay in place after a change-root is taken affect. It just reverts to black. Is there any way I can change that too in .bashrc?
View 3 Replies View RelatedI'm very new to Linux, i'm running Ubuntu and i'm trying to install a program. In the instructions it says "Check that you ARE NOT root, never run similar tools as root! just change file permissions". How do i check if i'm root or what am I supposed to do here?
View 7 Replies View Relatedi have an asus p5kpl-am se g31 socket 775 mobo with an intel pentium e5300 2.6 ghz cpu.
i think my problem might be with authentication or permissions possibly in pam.d, but i can not login as root, canot su, nor sudoer. i can't even use bash because i can't enter my password because when i enter characters the cursor just blink but doesn't even move.
i've tried re-installing. i've checked the configuration of the keyboard, but i'm limited without root access to some files.
One of our Fedora 14 machines has the root user stuck in bash. This would not be a problem as we rarely use root, but some of our processing runs on cronjobs from the root account. Tcsh is installed and up to date. All other users can switch shells except root. I do not know what happened as I was out for a day and came back and the processing was not working.
View 1 Replies View RelatedHow to enable Root login...i cant copy or move something on the HDD...I have administrator rights and password for root but i cant change permissions for the HDD without login on root and root login are not allowed .
View 10 Replies View RelatedIs It possible to change a process running in root-user to non-root-user by setting suid / uid / euid / gid etc... I so please instruct how, when and wat to set in order to change a process running in root-user to non-root user
View 4 Replies View RelatedI need to launch a bash file in Linux from an unprivileged user session, file that will run bash commands as root. But I do not want to create an user with root privileges to do that.
View 10 Replies View RelatedOutput of my #alias command looks just as normal as one would expect:
Code:
alias +='pushd .'
alias -='popd'
alias ..='cd ..'
alias ...='cd ../..' .....
And still whenever I (as root) type in bash
#ll
which would be short for
#ls- l
i get output of the command
#ls -al
So where aliases for root overwritten? Usually I would expect .bashrc in the /root directory. Or at least .alias file. But there none of those in my current /root. So, my question is where root user gets it's aliases from? This concerns only root user. Normal user has .bashrc and I made up my own aliases in .alias and that's works jut fine. And yes I could make .bashrc file in the /root and .aliases where I would define my own things.
I am trying to write a script that will create a directory, copy files to it, zip them, move the zip file to the desktop and clean up.However, when I run the script, it comes back stating that I do not have permission to make the directory. I wanted to know how to add the permission into the script to allow for access to whoever runs the script to pull the logs, but won't leave the system in the root user?here is what I have for code so far:
#!/bin/bash
host= 'hostname'
mkdir /home/savelogs
[code]....
I am having redhat 5 linux machine running on my windwos x in vmware workstation. Today i was installing oracle software in redhat 5 after editing the bash profile for the oracle user i got the following messages
su - oracle
password:*****
-bash: [oracle: command not found
[code]....
i am using fedora 10 while i login as a normal user its working fine username@hostname while i login as a root user it goes directly into -bash-3.2# if i check pwd it shows /root till now i am not facing any problem as i am using as a normal user but how can i change -bash-3.2# to root@hostname which file and where to edit
View 9 Replies View RelatedCode:
[liveuser@localhost hd1]$ cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
color=never
# installroot=/home/liveuser/hd1
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[liveuser@localhost hd1]$ yum list installed bash grep
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Installed Packages
bash.x86_64 4.1.7-3.fc14 @fedora/$releasever
grep.x86_64 2.7-1.fc14.1 @fedora/$releasever
[liveuser@localhost hd1]$ sudo vi /etc/yum.conf
[liveuser@localhost hd1]$ cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
color=never
installroot=/home/liveuser/hd1
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[liveuser@localhost hd1]$ yum list installed bash grep
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Error: No matching Packages to list
Basically when I comment out installroot it says grep and bash are installed but when I change installroot it says grep and bash are not installed?
I'm scratching my head over a very simple netcat-based heartbeat monitoring script i wrote.
here we go:
Code:
echo `date --utc "+%Y-%m-%d %H:%M:%SZ"` script started
[code]...
Today I faced a very strange issue while switching to root account in a bash shell.My OS : CentOS-5.1.4
I logged in my system with account name user1 and I open the terminal and below shell opens
[user1@localhost ]$
Now when I type su and want to switch to root account , it fails
[user1@localhost ~]$ su
Password:
su: incorrect password
[user1@localhost ~]$ exit
I know the password is 123 & I m 100% sure .
I have a bash script that I am using for doing tape backups. The meat of the bash script is
sudo tar --totals -H pax -cvf /dev/st0 *
This all works just fine.
But of course tape functions have to be ran as root, therefore sudo, requiring the standard user to enter the root password. I would like to be in a situation where the standard user does not need (does not know) the root password. I think my solution is add that standard user.
User named dog to the sudo list.
I have reviewed the sudo man page and looked at [URL]. I am still fuzzy.
1- Will adding user 'dog' to this sudo list do what I expect meaning I can run:
sudo tar --totals -H pax -cvf /dev/st0 *
and the user is not queried for the root password
2- How do I do that? and do I make a cmd alais for only: "tar --totals -H pax -cvf /dev/st0 *"
My distro is OpenSuse.
I'm trying to change the Xfce Terminal Emulator prompt from bash-4.1$ to something like what kconsole has. If i issue a /bin/bash -l in the terminal, then I get the prompt and the colors that I want, but I'd like this to automagically happen when I click the Terminal icon in the Xfce panel.This is for Slackware 13.37 (32bit) and Terminal 0.4.6
View 2 Replies View RelatedI have one account on an Ubuntu server with the correct PS1 variable and I want to make one of my other accounts on the same server have the same PS1 variable, so that my prompt on this new account (when I ssh into the machine) is the same as the original account.
Is there a way that I can pass this PS1 variable between accounts so the prompt is the same?
I have tried printing it out, copying the output, and then reassigning it to PS1 on the new account, but it just doesn't work.
Here is what is printed when I type echo $PS1:
[e]0;u@h: wa]${debian_chroot:+($debian_chroot)}[�33[01;32m]u@h[�33[00m]:[�33[01;34m]w[�33[00m]$
I want to assign that prompt (shown above) to my new account.
I'm trying to change the bash prompt and based on the man pages $ should show a $ which changes to a # for a SU. However, this doesn't happen on my machine, it's $ for both user and SU.The line in .bashrc is:export PS1="u@h:w$"
View 7 Replies View RelatedWe have a custom app that runs on boot on some older hardware running DSL linux, and their startup manager was quite simple. We purchased some newer Asus eeebox's which run xandros and things are quite stable and run nice with 1 exception.The application only runs from the root (/) location. This box auto logs in as 'user' and there is a /home/user/.kde/Autostart folder where you can stick scripts to run at boot. So I have a start.sh script, and with little bash programming tried things such as;
sudo cd /
sudo /startapp.pl
but the errors start spewing with the basic;can't find data/xyz as it's looking in the local.I thought there was a basic cwd (change working directory) but everything I try just forces the run from that location.Any ideas or suggestions are appreciated, but things like can you change the code, etc. can't be done, so it must be a programming thing. The only other thought I had but not sure, can you do a cronjob with @boot or something, that when the box starts, it can run this job as root and fire off?
I wrote bash script that uses zenity and a choice to install various programs, tested it and it works, but only when I call it from terminal. I wanted to add it in gnome main menu. The script is /home/eee/zenity.sh. In accessories I added an entry with command:
Code:
/home/eee/zenity.sh
, but since there is no terminal it starts zenity, but it does not work. I have also tried
Code:
gksu gnome-terminal -x /home/eee/zenity.sh
[Code].....
So I have created a Bash script with the intent of the program to change the names of the files in a folder's subdirectory.The code recognises the individual subdirectories, then is able to enter into one and list the files individually, but when it tries to change their information it says;' cannot stat ' : ' No such file or directory 'As if it is looking in the directory that contains the Bash script, not its subdirectory.It is essentially saying, I see a file here called FILE but sorry, I can't change FILE because FILE doesn't exist. kweh?Is this something outside the capabilities of Bash? Am I asking too much of it? Can Bash only manipulate files that are in the same folder as the script?
Code:
#!/bin/bash
echo enter directory
[code]....
I tried following the example from here (http:url]......)Open up publicity.html for reading and writing by anyone.
Before: -rw-r--r-- publicity.html
Command: chmod og=rw publicity.html
After: -rw-rw-rw- publicity.html
Here's my terminal session:
username@ubuntu:/etc$ -rw-r--r-- bash.bashrc
-rw-r--r--: command not found
username@ubuntu:/etc$ chmod og=rw bash.bashrc[code]....