LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-19-2019, 01:35 AM   #1
Pentti Poytakangas
LQ Newbie
 
Registered: Mar 2011
Location: Finland
Distribution: S64-current/multilib
Posts: 27

Rep: Reputation: 2
Smile chmod -x passwd


Hello!
What happent if I do #chmod -x passwd.
Or is there better way to stop making new users.
Kids are too good to make bad things
 
Old 10-19-2019, 01:41 AM   #2
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Just do it. Then you will see. And yo will tell us what it does.
 
2 members found this post helpful.
Old 10-19-2019, 04:36 AM   #3
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
It would just mean that nobody could execute the passwd program, I can't think of any consequences beyond that.

However, I would think a better thing to do would be to just "chmod 700 /usr/bin/passwd" then root could still execute it. If those bad "kids" have root, it wouldn't much matter what you did to it. Note that passwd normally has the suid bit set so normal users can use it (with sufficient privileges to write their changes).

P.S. They'd have to be root to create new users. The solution is to not give them root privileges. (useradd or adduser script front end is used to create users)

Last edited by TheRealGrogan; 10-19-2019 at 04:46 AM.
 
Old 10-19-2019, 05:32 AM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
If you do not give your kids root access then they should not be able to create new users anyway.
 
1 members found this post helpful.
Old 10-19-2019, 05:56 AM   #5
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
I can't still believe it is not a joke. So let me provide captcha test: on what port number service spsvd is listening on?
 
Old 10-20-2019, 01:24 AM   #6
Pentti Poytakangas
LQ Newbie
 
Registered: Mar 2011
Location: Finland
Distribution: S64-current/multilib
Posts: 27

Original Poster
Rep: Reputation: 2
ok!
only problem is they boot on usb and change root passwd with chroot.
I must take wires off in computer.No more usb or dvd.
I think this is solved
 
Old 10-20-2019, 01:53 AM   #7
ZhaoLin1457
Senior Member
 
Registered: Jan 2018
Posts: 1,045

Rep: Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253
Quote:
Originally Posted by Pentti Poytakangas View Post
only problem is they boot on usb and change root passwd with chroot.
I believe that in your situation, the single reasonable solution is to use encryption for your partitions.

Using a good quality flash drive as your boot drive, with the kernel and initrd, you can save here the decryption key, then unless that particular flash drive is plugged in the box, nobody can access your system and data.

Of course, that's unless your kids are NSA-grade hackers and they already hidden in your garage a super-computer having at least 10000 Threadrippers. Case when you are doomed anyway.

Last edited by ZhaoLin1457; 10-20-2019 at 01:55 AM.
 
1 members found this post helpful.
Old 10-20-2019, 04:25 AM   #8
chemfire
Member
 
Registered: Sep 2012
Posts: 426

Rep: Reputation: Disabled
As others have pointed out here breaking the system by removing the execute permission on the password program really makes little sense. Primarily because anyone with enough permissions to "add a user" in practical terms on Slackware that means writing to /etc/passwd, /etc/group, /etc/shadow can also simply restore the permissions on the passwd binary.
 
1 members found this post helpful.
Old 10-20-2019, 05:04 AM   #9
Pentti Poytakangas
LQ Newbie
 
Registered: Mar 2011
Location: Finland
Distribution: S64-current/multilib
Posts: 27

Original Poster
Rep: Reputation: 2
This is problem with public machines in youthcenter.

I find a way (someone want know)
Install slackware with LVM in crypted disk.(no easyway to chroot)
#chmod -x passwd
#chattr +i /etc/shadow
(no seems to harm)
Thanks!
 
Old 10-20-2019, 05:24 AM   #10
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,917

Rep: Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035
How about setting a bios admin password and restricting the bootlist to the internal disk only? That's how we did it in the old days.

Your changes to passwd and /etc/shadow are completely useless.
 
2 members found this post helpful.
Old 10-20-2019, 08:05 AM   #11
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Can't you disable USB boot? BIOS needs to be configured to be able to boot form DVD or USB.

Edit: Find those guys and try to teach them something more useful. Seems they are quite capable. Who knows? When I was kid I stolen books from bookstore. Manager caught me. Instead of calling militia he ordered me to visit bookstore an help him time to time. This is how I started to read the books.

Last edited by igadoter; 10-20-2019 at 08:13 AM.
 
Old 10-20-2019, 08:26 AM   #12
Pentti Poytakangas
LQ Newbie
 
Registered: Mar 2011
Location: Finland
Distribution: S64-current/multilib
Posts: 27

Original Poster
Rep: Reputation: 2
Helou!
Like I write before.Nobody can chroot cause LVM+crypted disks.
Chroot not understand logicalvolumes .
Chattr +i they can't write shadow file.
And users not change password chmod -x passwd.
Like GazL write easyest way is old way...(bios password)
I forgotten that
I hope this enough.Some day those genious find the way..
like take battery off on motherboard.
How smart they can be
We solved this!
Many thanks !
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache: difference between chmod 644 and chmod 666 and chmod 600 for output/txt/dat? frenchn00b Programming 6 04-22-2009 01:10 PM
chmod, external usb, vfat - can't chmod a directory itsjustme Slackware 2 04-02-2006 04:23 PM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM
CHMOD in shell : chmod 777 /usr/ <---is that right? cpanelskindepot Programming 5 07-16-2004 05:37 AM
chmod +s or chmod -s excel28 Linux - General 1 09-30-2003 03:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:37 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration