Sandro1
(usa openSUSE)
Enviado em 16/10/2014 - 10:59h
Os comandos:
Sandro@openSUSE-POS-PIH55BO:~> sudo cat /etc/group
root's password:
audio:x:17:
avahi:x:494:
avahi-autoipd:x:495:
bin:x:1:daemon
cdrom:x:20:
colord:x:488:
console:x:21:
daemon:x:2:
dialout:x:16:Sandro
disk:x:6:Sandro
floppy:x:19:
ftp:x:49:
games:x:40:
gdm:x:485:
kmem:x:9:
libvirt:x:482:
lock:x:54:
lp:x:7:
mail:x:12:postfix
maildrop:x:59:postfix
man:x:62:
messagebus:x:499:
modem:x:43:Sandro
mysql:x:479:
news:x:13:
nobody:x:65533:
nogroup:x:65534:nobody
nscd:x:496:
ntadmin:x:71:
ntp:x:491:
polkitd:x:490:
postfix:x:51:
public:x:32:
pulse:x:487:
pulse-access:x:486:
root:x:0:Sandro,sandro
rtkit:x:489:
scard:x:484:
shadow:x:15:
sshd:x:493:
svn:x:481:
sys:x:3:
systemd-journal:x:498:
tape:x:497:
tftp:x:492:dnsmasq,tftp
trusted:x:42:
tty:x:5:Sandro
utmp:x:22:
uucp:x:14:
vboxusers:x:483:Sandro
video:x:33:gdm
vscan:x:480:
wheel:x:10:Sandro,sandro
www:x:8:
xok:x:41:
users:x:100:Sandro,pulse,sandro
nagios:x:478:
nagcmd:x:477:nagios,wwwrun
ntop:x:476:
at:x:25:
Sandro@openSUSE-POS-PIH55BO:~> sudo cat /etc/sudoers
## sudoers file.
##
## This file MUST be edited with the 'visudo' command as root.
## Failure to use 'visudo' may result in syntax or file permission errors
## that prevent sudo from running.
##
## See the sudoers man page for the details on how to write a sudoers file.
##
##
## Host alias specification
##
## Groups of machines. These may include host names (optionally with wildcards),
## IP addresses, network numbers or netgroups.
# Host_Alias WEBSERVERS = www1, www2, www3
##
## User alias specification
##
## Groups of users. These may consist of user names, uids, Unix groups,
## or netgroups.
# User_Alias ADMINS = millert, dowdy, mikef
##
## Cmnd alias specification
##
## Groups of commands. Often used to group related commands together.
# Cmnd_Alias PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
# /usr/bin/pkill, /usr/bin/top
##
## Defaults specification
##
## Prevent environment variables from influencing programs in an
## unexpected or harmful way (CVE-2005-2959, CVE-2005-4158, CVE-2006-0151)
Defaults always_set_home
Defaults env_reset
## Change env_reset to !env_reset in previous line to keep all environment variables
## Following list will no longer be necessary after this change
Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE"
## Comment out the preceding line and uncomment the following one if you need
## to use special input methods. This may allow users to compromise the root
## account if they are allowed to run commands without authentication.
#Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
## Do not insult users when they enter an incorrect password.
Defaults !insults
##
## Uncomment to enable logging of a command's output, except for
## sudoreplay and reboot. Use sudoreplay to play back logged sessions.
# Defaults log_output
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/sbin/reboot !log_output
## In the default (unconfigured) configuration, sudo asks for the root password.
## This allows use of an ordinary user account for administration of a freshly
## installed system. When configuring sudo, delete the two
## following lines:
Defaults targetpw # ask for the password of the target user i.e. root
ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!
##
## Runas alias specification
##
##
## User privilege specification
##
root ALL=(ALL) ALL
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.d
izaias escreveu:
albfneto escreveu:
assim não roda, sandro... # /pasta/sub-pasta ,não é "comando" é acesso direto, e forbidden.
Tenrtte como Izaías falou, ou com comando cat....tente assim, como user comum:
$ sudo cat /etc/group
$ sudo cat /etc/sudoers
no sudo, use senha de usuario normal. ao mesmo tempo, Vamos ver se seu sudo tá funcionando
Alberto, estamos cometedo um erro aqui. rs
Ele não consegue acessar o root.
É melhor estes:
cat -n /etc/group
cat -n /etc/sudoers