LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices

Reply
 
LinkBack Search this Thread
Old 12-18-2010, 12:09 AM   #1
biggles1963
LQ Newbie
 
Registered: Jul 2009
Location: Melbourne
Distribution: Mandriva 2008
Posts: 24

Rep: Reputation: 0
eee PC xandros - no password on sudo


putting a password on sudo disabled the little PC. I got it back but would still like sudo to ask for a password. Can anyone tell me what scripts run when xandros boots? If I can find it, perhaps I can make that specific command passwordless only.
 
Old 12-18-2010, 12:32 AM   #2
rokytnji
Senior Member
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: AntiX 13 , Various Puppys (MacPup,Slack0),MX-14
Posts: 2,129
Blog Entries: 12

Rep: Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639
To change a password just type in the terminal:

Code:
sudo passwd root
(to change the root password)

or

Code:
sudo passwd user
(to change the user password)

the command for finding

Code:
cat /etc/sudoers
http://wiki.eeeuser.com/howto:help_f...word_procedure
 
Old 12-19-2010, 06:10 AM   #3
biggles1963
LQ Newbie
 
Registered: Jul 2009
Location: Melbourne
Distribution: Mandriva 2008
Posts: 24

Original Poster
Rep: Reputation: 0
changing "NOPASSWORD" to "PASSWORD" in sudoers

I'll try and be more specific: Currently on the eee PC, sudo does not ask for a password, which makes the PC vulnerable to attack in that viruses and rogue software have administrative access to the machine - which is a problem with most Windows setups, and one that I'd like to avoid. HOWEVER somewhere in the boot scripts of the eee PC, a sudo command is executed. If you set sudoers to "PASSWORD" then the PC boot stops - somewhere before you get the login screen. Can anyone help to identify the script that executes a sudo command when booting?
 
Old 12-20-2010, 02:34 AM   #4
nocountryman
Member
 
Registered: Dec 2009
Location: Bulgaria for now :)
Distribution: Fedora 14
Posts: 60

Rep: Reputation: 3
can you post your sudoers?

Code:
cat /etc/sudoers
Also set sudo to use password and the system halts at some point, can you post your dmesg and messages and boot.log output?

dmesg:
Code:
dmesg
and

messages:

Code:
cat /var/log/messages
boot.log:

Code:
cat /vat/log/boot.log
this must show where it stalls.

from there you could figure out which part runs sudo (even tho its strange that something on boot will run sudo ? )

cheers

Last edited by nocountryman; 12-20-2010 at 02:39 AM.
 
Old 12-21-2010, 03:34 AM   #5
biggles1963
LQ Newbie
 
Registered: Jul 2009
Location: Melbourne
Distribution: Mandriva 2008
Posts: 24

Original Poster
Rep: Reputation: 0
I got some of them. I couldn't find reference to sudo in them. thanks for looking into this. It strikes me as an irresponsible way to setup a machine -very microsoft.

they won't let me post the output here - too many chars. I'll look into how to do attachments.
 
Old 12-22-2010, 05:42 PM   #6
biggles1963
LQ Newbie
 
Registered: Jul 2009
Location: Melbourne
Distribution: Mandriva 2008
Posts: 24

Original Poster
Rep: Reputation: 0
eee PC start scripts running sudo

I found that the file:
/usr/bin/startsimple
contains sudo'd commands, in particular:
sessreg, firstrunwizard, kill, rm,sh

is there a way to make this script run with root priviliges so I can un-sudo the commands and force the use of a password for sudo?
 
Old 12-23-2010, 02:51 AM   #7
nocountryman
Member
 
Registered: Dec 2009
Location: Bulgaria for now :)
Distribution: Fedora 14
Posts: 60

Rep: Reputation: 3
can you post the startsimple script here? and also did you find how it is started? which user/service starts it?
 
Old 12-24-2010, 06:33 AM   #8
biggles1963
LQ Newbie
 
Registered: Jul 2009
Location: Melbourne
Distribution: Mandriva 2008
Posts: 24

Original Poster
Rep: Reputation: 0
/usr/bin/startsimple.sh

#!/bin/sh

sudo /usr/bin/sessreg -d -l :0.0 -u /var/run/utmp user
xhost + si:localuser:root # Allow local user root only to access the diplay

if ! [ -f /home/user/.firstrundone ]; then
sudo /usr/bin/sessreg -a -l :0.0 -u /var/run/utmp user
sudo /usr/bin/firstrunwizard
if [ $? -eq 0 ]; then
touch /home/user/.firstrundone
else
sudo /bin/kill -USR2 1
fi
elif [ -f /tmp/kdesession -a ! -f /home/user/.easysession ]; then
sudo /usr/bin/sessreg -a -l :0.0 -u /var/run/utmp user
if [ ! -d /home/user/Desktop ]; then
if [ -d /home/.Desktop ]; then
mv /home/user/.Desktop /home/user/Desktop
fi
fi
[ -f /usr/bin/dispwatch ] && /usr/bin/dispwatch &
for i in /sys/block/s[dr]?/uevent ; do
sudo /bin/sh -c "echo add > $i"
done
sudo rm -f /tmp/kdesession /tmp/nologin
exec startkde
else
sudo /usr/bin/sessreg -a -l :0.0 -u /var/run/utmp user
if [ -d /home/user/Desktop ]; then
if [ -d /home/user/.Desktop.bak ]; then
rm -rf /home/user/.Desktop.bak
fi
if [ -d /home/user/.Desktop ]; then
mv /home/user/.Desktop /home/user/.Desktop.bak
fi
mv /home/user/Desktop /home/user/.Desktop
fi
if [ -f /home/user/.easysession ]; then
# we are switching from full to easy mode
for i in /sys/block/s[dr]?/uevent ; do
sudo /bin/sh -c "echo add > $i"
done
fi
/opt/xandros/bin/AsusLauncher &
icewmtray &
[ -n "$XIM_PROGRAM" ] && $XIM_PROGRAM &
powermonitor &
minimixer &
networkmonitor ath0 eth0 &
wapmonitor &
(sleep 3; /usr/bin/keyboardstatus) &
(sleep 8; /opt/xandros/bin/start_netserv) &
(sleep 16; /usr/local/bin/asusosd) &
sudo rm /tmp/nologin
[ -f /usr/bin/dispwatch ] && /usr/bin/dispwatch &
exec icewm
fi
#################
I'm not sure how to identify the service that calls it...

Last edited by biggles1963; 12-24-2010 at 06:34 AM. Reason: left out message - added to bottom
 
Old 12-25-2010, 11:22 AM   #9
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
If you are running the standard xandros EEE OS, and you have changed some configuration, and you are now having trouble un-changing it, do not forget the "Factory Restore" option:

Hold F9 during bootup.
Highlight "Restore Factory Settings"
Press enter.

Your EEE will be "as new", so if you have any important data on it, you need to back this up first.

My EEE701 is currently happily running ubuntu 10.04 (had to plug in an SD card to get enough memory though).

I hope you have found http://wiki.eeeuser.com
 
Old 12-26-2010, 12:39 PM   #10
nocountryman
Member
 
Registered: Dec 2009
Location: Bulgaria for now :)
Distribution: Fedora 14
Posts: 60

Rep: Reputation: 3
my guess is:
you could add your user to a group that is allowed to run only these programs that are ran in the script without password.

%my_sudo_custom_group ALL= NOPASSWD: /usr/bin/sessreg

or simply your user instead of %my_sudo_custom_group in case you have only one user on the system.

and add

my_user_with_sudo ALL=(ALL) ALL

this will give you only needed programs able to run with sudo no password and the rest with password.
 
  


Reply

Tags
eeepc, sudo, sudoers


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
downloading on linux xandros using eee pc temi Linux - Newbie 2 02-11-2010 07:01 PM
From Windows to Eee Xandros to Ubuntu NR renehasekamp LinuxQuestions.org Member Intro 1 09-17-2009 04:02 AM
Xandros on Asus eee pc 1000 - alternative distro? jonbvgood Linux - Laptop and Netbook 6 03-12-2009 09:49 PM
Eee PC Xandros Linux compatible scanner roset Linux - Newbie 1 07-31-2008 09:34 PM
LXer: Debian To Replace Xandros on the Eee PC? LXer Syndicated Linux News 1 06-25-2008 03:00 PM


All times are GMT -5. The time now is 02:30 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration