![]() ![]() So the next two command you must issue are: sync reboot, halt or poweroff won't work, and exit from the shell will lead to a kernel panic, as the PID 1 process is not expected to just exit. You cannot shutdown or reboot the system cleanly at this point. ![]() In case you get a "command not found" error, use /sbin/usermod and /bin/id. Confirm with id -a YOURUSERID that you've got your sudo membership back. Make the change you want to make, for instance usermod -a -Gadm,sudo YOURUSERID.You'll get the root shell prompt, since the init process runs as PID 1 with the root identity. After the change, press F10 to use the commands from the editor to boot the system (or read the instructions how to boot right below the editor window, if your Grub is compiled differently).I'll be happy to explain how, step by step, if all else fails for you just leave a comment to this answer. Note: You can get by even with the bare grub> prompt. In the end, the line should look like linux. This instructs the kernel to execute sh instead of /sbin/init. Replace the ro token with rw, to make the root filesystem read/write, and add another kernel command line parameter, init=/bin/sh. Do not worry, any changes you make are not saved permanently. Grub will display a command line editor with multiple lines, every one of which may look unfamiliar if not intimidating. Boot into the Grub menu, and highlight (but don't press Enter on!) the normal (default, not a recovery!) boot option.Use the following only if you cannot get to the recovery mode through the Grub menu. I'm leaving this answer in case someone ends up in my shoes by this point. SeeĪfter pressing ENTER, the system booted normally: no luck getting root access to fix the problem. While booting into recovery mode, all I got was an unhelpful messageĬannot open access to console, the root account is locked. I had my system installed with the root login locked, and my account was the only one on the machine. I made the same mistake adding my account to a group (forgot the -a). Reboot and you should be able to use sudo again. Or to the sudo group (for Ubuntu 12.04 and later): adduser sudo ![]() ![]() Now enter one of the following commands to re-add your user to the admin group (for Ubuntu 11.10 and earlier): adduser admin no error messages), proceed directly to step 5 below.Īfter choosing the remount option, the menu comes up again. You can check out which is your system partition with fsck command or by viewing /etc/mtab.Īfter successfully running the mount command (i.e. If this option doesn't appear or won't work, you can instead choose the root option and use the following command to mount the system partition: mount -o remount / Select: remount Remount / read/write and mount all other file systemsĪnd wait for your file systems to get mounted with read/write permissions, then press Enter. Select the entry containing ( recovery mode) and wait. Where package_location is the path to the package.During boot, press and hold the left Shift key, and you should see the GRUB menu. Sudouser ALL = DVDINSTALLCMDS, DVDUNINSTALLCMDS, INSTALLDIRCMDS, CVPUSH, /bin/sh, /usr/bin/ metallic # Path to the scripts and binaries needed for the push installĬmnd_Alias CVPUSH =/opt/seed/*, /opt/ metallic/*, /opt/ metallic/installer/*, /opt/ metallic/Base/*, /usr/bin/ metallic, /usr/local/bin/ metallic, /usr/bin/cvpkgrm, /usr/local/bin/cvpkgrm # Path to the Metallic installation directoryĬmnd_Alias INSTALLDIRCMDS =/opt/ metallic/* If you want users to only run Metallic commands as root users, enter the following: # Allow users to install and run Metallic commandsĬmnd_Alias DVDINSTALLCMDS =/ package_location/cvpkgaddĬmnd_Alias DVDUNINSTALLCMDS =/usr/bin/cvpkgrm To remove the password prompt during the computer login, specify NOPASSWD: ALL as follows: sudouser ALL=(ALL) NOPASSWD: ALL If you want users to perform all UNIX commands as root users, enter the following: sudouser ALL=(ALL) ALL Open the /etc/sudoers configuration file in editable mode by using the following command: visudo On Solaris computers, edit the /etc/default/login configuration file and set the "PATH=" variable to the directory where sudo is installed. Before You Beginįor HP-UX, AIX, and Solaris computers, install sudo on the client before adding a sudo user. The sudo user must be added to the /etc/sudoers file. You can install the Metallic software as a sudo user with root privileges. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |