02-19-2005
changed shell of the root accidentally
Hi All,
I have changed the shell of the root accidentally to /sbin/bash
How do I change that?
To change that I need to go to ok prompt I think, and there I need to mount the root file system in order to make changes to the respective file.
Can any one please suggest how do I do that? Give me details of the procedure how to do the same.
-Asim
10 More Discussions You Might Find Interesting
1. SuSE
The group of the /root folder has been changed and then logged out
I am not able to log in to the /root user as it is saying Xsession log in not allowed
Is there any way that the group of the /root folder be changed? (1 Reply)
Discussion started by: napster_san
1 Replies
2. AIX
Hi, yesterday, I changed root's shell in /etc/passwd, cause a mistake then I can not log in root account (can't find correct shell). I attempted to log in single-mode, however, it prompted for single-mode's password then I type root's password but still can not log in.
I'm using AIX 5L version 5.2... (2 Replies)
Discussion started by: neikel
2 Replies
3. Solaris
> id root
0(root) 1(other)
From CIS scanning result"it should make sure the root's gid is equal to 0", so I don't know what's the impact for that change to whole system? BTW, why is there a group named other under solaris? what does group "other" do ?
Thanks very much! (3 Replies)
Discussion started by: a2156z
3 Replies
4. OS X (Apple)
I accidentally changed to sudo chmod a=w to my /usr/bin folder on my macbook with OS 10.5.8... Please help! I can't even get into a terminal correctly cause it displays:
-bash: uname: command not found
-bash: cut: command not found
-bash: uname: command not found
-bash: cut: command not found... (6 Replies)
Discussion started by: scaryMac23
6 Replies
5. UNIX for Advanced & Expert Users
Hi Experts,
I have create a new user with uid and gid as 0 in SuSE-11 Server. After that all the files having root owner ship are showing as new user name as owner. If I login as root, and type 'id' command, it also shows the new user.
Sample output from my server.
host:~ # id
uid=0(test)... (4 Replies)
Discussion started by: vipinable
4 Replies
6. Emergency UNIX and Linux Support
Hi.
I've had a little mishap.
To cut a long story short, I've accidentally recursively ran chown on a directory (actually a bunch of 'em). Not a problem in itself, but I had a slight error in the code I used to get the list of directories and ended up with a comment in the file ownership.
... (15 Replies)
Discussion started by: Scott
15 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I was carrying out some simple admin tasks setting up a user, logged in as root when I fumbled on the keyboard. It appears I typed
cp * ../user/<esc><esc>I hit return and now the display has set to a strange array of symbols
e.g.
¼Ùïõò §ÏÅÎÓÓȧ ãïîîåãôéïî èáó ôåòíéîáôåä
I've tried looking at the... (7 Replies)
Discussion started by: becky492
7 Replies
8. Shell Programming and Scripting
Hi All,
I have to work in the late nights some times for server maintenance and in a hurry to complete I am accidentally changing ownership or permission of directories :(
which have similar names ( /var in root and var of some other directory ).:confused:
Can some one suggest me with the... (1 Reply)
Discussion started by: shiek.kaleem
1 Replies
9. Red Hat
Hi All,
Accidentally changed ownership of /var directory as root :eek: thinking that I am changing ownership of var directory in other location in the file system:D.Now unable to SSH into the server:(.
By gods grace I was able to regain the access again as server was in control of me at that... (5 Replies)
Discussion started by: shiek.kaleem
5 Replies
10. AIX
Hello
i am running AIX 6.1. i recently changed the root password using passwd and pwdadm. while the new password works fine, i am still able to login using the old password. is there anyway this can disabled\fixed
thanks (5 Replies)
Discussion started by: dnlsingh
5 Replies
LEARN ABOUT DEBIAN
pivot_root
PIVOT_ROOT(8) System Administration PIVOT_ROOT(8)
NAME
pivot_root - change the root filesystem
SYNOPSIS
pivot_root new_root put_old
DESCRIPTION
pivot_root moves the root file system of the current process to the directory put_old and makes new_root the new root file system. Since
pivot_root(8) simply calls pivot_root(2), we refer to the man page of the latter for further details.
Note that, depending on the implementation of pivot_root, root and cwd of the caller may or may not change. The following is a sequence for
invoking pivot_root that works in either case, assuming that pivot_root and chroot are in the current PATH:
cd new_root
pivot_root . put_old
exec chroot . command
Note that chroot must be available under the old root and under the new root, because pivot_root may or may not have implicitly changed the
root directory of the shell.
Note that exec chroot changes the running executable, which is necessary if the old root directory should be unmounted afterwards. Also
note that standard input, output, and error may still point to a device on the old root file system, keeping it busy. They can easily be
changed when invoking chroot (see below; note the absence of leading slashes to make it work whether pivot_root has changed the shell's
root or not).
EXAMPLES
Change the root file system to /dev/hda1 from an interactive shell:
mount /dev/hda1 /new-root
cd /new-root
pivot_root . old-root
exec chroot . sh <dev/console >dev/console 2>&1
umount /old-root
Mount the new root file system over NFS from 10.0.0.1:/my_root and run init:
ifconfig lo 127.0.0.1 up # for portmap
# configure Ethernet or such
portmap # for lockd (implicitly started by mount)
mount -o ro 10.0.0.1:/my_root /mnt
killall portmap # portmap keeps old root busy
cd /mnt
pivot_root . old_root
exec chroot . sh -c 'umount /old_root; exec /sbin/init'
<dev/console >dev/console 2>&1
SEE ALSO
chroot(1), mount(8), pivot_root(2), umount(8)
AVAILABILITY
The pivot_root command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
util-linux February 2000 PIVOT_ROOT(8)