[Bug 1319676] Re: sudo launched root prompt not the program
Seth Arnold
1319676 at bugs.launchpad.net
Thu May 15 17:34:32 UTC 2014
Thanks for filing a bug report; however, your log looks exactly as
expected.
The 'admin' user should not be confused with the system's superuser
account 'root'. 'admin' is something that is local to your site and
unless you or your system administrator has gone to some effort to
configure local filesystem permissions and perhaps group permissions,
the user 'admin' wouldn't be expected to be able to write into a
directory owned by the user 'b21an'.
Note especially that 'script' presents you with a new shell and records
all input and output from that shell, and commands you type there. It is
expected that it gives you a new shell prompt, and when you used 'sudo'
to start script, it gave you the expected # prompt. If you didn't want
to run 'script' as root, you should leave off the 'sudo'. You could use
the command line parameter to specify a place that the 'admin' user has
write privileges too, such as the admin user's home directory, like
this:
$ script ~admin/typescript
When you want to exit the shell started by 'script', type 'exit' or use
the usual ^D.
Thanks
** Changed in: sudo (Ubuntu)
Status: New => Invalid
** Information type changed from Private Security to Public
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sudo in Ubuntu.
https://bugs.launchpad.net/bugs/1319676
Title:
sudo launched root prompt not the program
Status in “sudo” package in Ubuntu:
Invalid
Bug description:
admin working in user home directory for making typescript;
sudo script results in root prompt, not running the desired program 'script' to make a typescript session.
b21an at ai7:~/Downloads/ANIMBAR/animbar-1.2/build$ su admin
Password:
admin at ai7:/home/b21an/Downloads/ANIMBAR/animbar-1.2/build$ ls
animbar.h CMakeCache.txt CMakeFiles cmake_install.cmake CPackConfig.cmake CPackSourceConfig.cmake Makefile src
admin at ai7:/home/b21an/Downloads/ANIMBAR/animbar-1.2/build$ script
script: open failed: typescript: Permission denied
Terminated
admin at ai7:/home/b21an/Downloads/ANIMBAR/animbar-1.2/build$ sudo make-install-typescript-`sh ~/bin/date.sh`
[sudo] password for admin:
Sorry, try again.
[sudo] password for admin:
sudo: make-install-typescript-20140515-1400137493: command not found
admin at ai7:/home/b21an/Downloads/ANIMBAR/animbar-1.2/build$ sudo script make-install-typescript-`sh ~/bin/date.sh`
Script started, file is make-install-typescript-20140515-1400137515
root at ai7:/home/b21an/Downloads/ANIMBAR/animbar-1.2/build#
root at ai7:/home/b21an/Downloads/ANIMBAR/animbar-1.2/build# cat /etc/issue
Ubuntu 12.04.4 LTS \n \l
root at ai7:/home/b21an/Downloads/ANIMBAR/animbar-1.2/build# cat /tmp/apport.sudo.zY_J5T.apport
ProblemType: Bug
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: amd64
Date: Thu May 15 00:26:57 2014
Dependencies:
coreutils 8.13-3ubuntu3.2
debconf 1.5.42ubuntu1
dpkg 1.16.1.2ubuntu7.4
gcc-4.6-base 4.6.3-1ubuntu5
libacl1 2.2.51-5ubuntu1
libattr1 1:2.4.46-5ubuntu1
libbz2-1.0 1.0.6-1
libc-bin 2.15-0ubuntu10.5
libc6 2.15-0ubuntu10.5
libdb5.1 5.1.25-11build1
libgcc1 1:4.6.3-1ubuntu5
liblzma5 5.1.1alpha+20110809-3
libpam-modules 1.1.3-7ubuntu2
libpam-modules-bin 1.1.3-7ubuntu2
libpam0g 1.1.3-7ubuntu2
libselinux1 2.1.0-4.1ubuntu1
multiarch-support 2.15-0ubuntu10.5
perl-base 5.14.2-6ubuntu2.4
tar 1.26-4ubuntu1
tzdata 2014c-0ubuntu0.12.04
xz-utils 5.1.1alpha+20110809-3
zlib1g 1:1.2.3.4.dfsg-3ubuntu4
DistroRelease: Ubuntu 12.04
MarkForUpload: True
Package: sudo 1.8.3p1-1ubuntu3.6
PackageArchitecture: amd64
ProcEnviron:
LANGUAGE=en_US:en
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.2.0-60.91-generic 3.2.55
SourcePackage: sudo
Sudoers:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
Tags: precise
Uname: Linux 3.2.0-60-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
VisudoCheck: /etc/sudoers: parsed OK
1. root at ai7:/home/b21an/Downloads/ANIMBAR/animbar-1.2/build# lsb_release -rd
Description: Ubuntu 12.04.4 LTS
Release: 12.04
2. root at ai7:/home/b21an/Downloads/ANIMBAR/animbar-1.2/build# apt-cache policy sudo
sudo:
Installed: 1.8.3p1-1ubuntu3.6
Candidate: 1.8.3p1-1ubuntu3.6
Version table:
*** 1.8.3p1-1ubuntu3.6 0
500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
100 /var/lib/dpkg/status
1.8.3p1-1ubuntu3 0
500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
3. expected sudo to run the typescript command 'script'
4. Got root prompt in user directory.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/1319676/+subscriptions
More information about the foundations-bugs
mailing list