You are not logged in.
Pages: 1
A root's login prompt are simply without password prompt, I never typed root's password when I logged in as root. How to find the root's password, change it and use it with 'su' command? Visudo (Vi) has a very strange syntax for editing, I cannot edit sudoers file despite of reading man vi. Is there neccessary edit sudoers file with visudo to give the user some root's privilegues? Thanks a lot, I am quite an old dog to learn all quickly and wish to use Arch regulary...
Our tomcat for your mice! Archlinux for your comps! Alfa Romeo for your roads! Faster running guaranted!
Offline
Log in as root (doing it without a password is fine), then use the passwd command to set a new password.
You don't need to do anything with sudo if a root password is all you want, but if you want to give another account (like your normal user account) full control over everything, then add this line with visudo:
yourusername ALL=ALL
That's the most basic configuration that allows "yourusername" to run all commands as root. It also means that your system security is only as good as "yourusername"'s password (since that's the password sudo asks for).
You mentioned that you were wondering whether it was necessary to give a user "some" root privileges with sudo. What kinds of privileges did you have in mind?
Offline
It sounds like you never set root's password. To set it, enter (as root)
passwd
.
About visudo and vim, to enter text type "i" this means "insert text". Hitting the ESC key puts you into command mode, were you can no longer edit the file. From here (command mode) you can save and exit by typing ":wq" and enter. The "w" stands for write and "q" stands for quit. So to exit without saving it would just be ":w". Alternately to the save and exit command listed above you should be able to do "<shift->zz".
Offline
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
username ALL=NOPASSWD: /usr/bin/cdrecord,/usr/bin/gcombust,/usr/bin/cdrdao,/usr/bin/eject,/bin/mount,/bin/umount,/usr/X11R6/bin/XFree86,/opt/kde/bin/k3b,/usr/sbin/fping,/usr/bin/kismet
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
gives the user "username" rights to run cdrecord, gcombust,cdrdao ... etc
This is saves a lot of work when you regrade those apps which need root privledges to run.
#!/bin/sh
DEV="/dev/burner"
if [ ! $2 == "" ]; then SPEED=$2 ; else SPEED=52 ; fi
time sudo cdrecord -tao dev=$DEV speed=$SPEED driveropts=burnfree -overburn -eject $1
is my script for burning as an ordinary user. I just call it burn. as in
burn /tmp/arrgh.iso
--(*(cs25x--));
Offline
maybe i'm weird but i've never had any problems burning cds as a non-root user.
Offline
From here (command mode) you can save and exit by typing ":wq" and enter. The "w" stands for write and "q" stands for quit. So to exit without saving it would just be ":w". .
Shouldn't it be ":q" to exit without saving?
Offline
Penguin wrote:From here (command mode) you can save and exit by typing ":wq" and enter. The "w" stands for write and "q" stands for quit. So to exit without saving it would just be ":w". .
Shouldn't it be ":q" to exit without saving?
If you've made a change I think you need to do :q!
Offline
Penguin wrote:From here (command mode) you can save and exit by typing ":wq" and enter. The "w" stands for write and "q" stands for quit. So to exit without saving it would just be ":w". .
Shouldn't it be ":q" to exit without saving?
yeah, sorry. And you do need the ! to quit without saving if you made changes.
Offline
Thanks a lot, Penguin, you were right, the root password had not been set! I was courious about "su" command invoking password prompt and followed by failed login when leaving password blank...
I had to be blind to miss "i" and "w" commands for editing visudo... Too many work on too many orchards set me completely dull... Hooray! An old dog is using and configuring hardcore linux distro! With your kind help, thank you again!
Our tomcat for your mice! Archlinux for your comps! Alfa Romeo for your roads! Faster running guaranted!
Offline
Pages: 1