SlideShare a Scribd company logo
1 of 2
Restricting UNIX Users
Users are inherently limited in what they can do on a UNIX system due to file
permissions, passwords and other standard UNIX controls. However, it is often
necessary to further restrict system users in other ways, both to protect them from
themselves and to protect the system from the malicious or overly "playful" users.
Change password
Change Root password on periodic basis and limit access to other users, keep
password expiration periods.
File Permissions
Let’s start from the weakest limitation one can impose: use of UNIX permissions. In
fact, it is probably sufficient for most environments. While seemingly inflexible,
permissions allow control over what binaries users can execute. If all binaries except
the ones that need to be executed by the untrusted users are not world executable,
and all user-writable partitions such as /tmp and /home are mounted with noexec
flag (see man mount for the details on that), the security of the set-up is adequate.
Noexec flag is needed to prevent users from downloading or building their own
versions of binaries. If there is a pool of users that need the higher privileges, those
can be gathered in a special group and binaries are made group-executable.
Limits for all users (apparently, except "root"):
File: /etc/security/limits.conf
* hard core 0
* hard rss 10000
* hard nproc 100
Shown above are limits for the size of core files, resident memory for the process
and number of owned processes. "Hard" limits cannot be changed by the user, while
"soft" can. And for the specific group "lusers":
@lusers hard core 0
@lusers hard rss 2000
@lusers hard nproc 200
@lusers hard fsize 100000
@lusers hard nofile 100
@lusers hard cpu 10
@lusers hard priority 5 # same as "nice -n 5" on all processes
(in addition, maximum file size, number of open files, maximum CPU time and
process priority are set)
Restricted Shell
The next degree of limitation is to be a restricted shell. In this case, a version of a
normal bash shell will prevent users from changing the directory and environment
variables, redirecting output, running commands with absolute pathnames, using
exec command and some other actions. Restrictions are not enforced for shell
scripts. See man bash for more details. Combining rbash with a restrictive
configuration of UNIX permissions can help achieve further security.
Rbash is a viable choice if you are trying to somewhat contain trusted users. Its
restrictions can be easily overcome (see below).
To test rbash restricted shell functionality:
# adduser luser
# ln -s /bin/bash /bin/rbash
# echo "/bin/rbash" >> /etc/shells
# chsh -s /bin/rbash luser
# cd ~luser
# su luser
$
and then:
$ cd /
rbash: cd: restricted

More Related Content

What's hot

Mise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous dockerMise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous dockerNicolas Trauwaen
 
Introduction to FreeBSD commands(beta)
Introduction to FreeBSD commands(beta)Introduction to FreeBSD commands(beta)
Introduction to FreeBSD commands(beta)郁凱 黃
 
17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboardsDenis Ristic
 
Server hardening methedologies
Server hardening methedologies Server hardening methedologies
Server hardening methedologies Shreya Pohekar
 
Linux standard file system
Linux standard file systemLinux standard file system
Linux standard file systemTaaanu01
 
Fuse- Filesystem in User space
Fuse- Filesystem in User space Fuse- Filesystem in User space
Fuse- Filesystem in User space Danny Tseng
 
Linux permissions
Linux permissionsLinux permissions
Linux permissionsCelsius A T
 
File permission in Linux
File permission in LinuxFile permission in Linux
File permission in LinuxKrutikMandre1
 
Linux System Administration Crash Course
Linux System Administration Crash CourseLinux System Administration Crash Course
Linux System Administration Crash CourseJason Cannon
 
A Brief History of the BSD File System
A Brief History of the BSD File SystemA Brief History of the BSD File System
A Brief History of the BSD File SystemMuhammad Junaid Ali
 
FUSE (Filesystem in Userspace) on OpenSolaris
FUSE (Filesystem in Userspace) on OpenSolarisFUSE (Filesystem in Userspace) on OpenSolaris
FUSE (Filesystem in Userspace) on OpenSolariselliando dias
 
Using The Unix Command Line
Using The Unix Command LineUsing The Unix Command Line
Using The Unix Command Lineadil raja
 

What's hot (20)

Mise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous dockerMise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous docker
 
Python & FUSE
Python & FUSEPython & FUSE
Python & FUSE
 
SELinux by Example
SELinux by ExampleSELinux by Example
SELinux by Example
 
SUSE
SUSESUSE
SUSE
 
Introduction to FreeBSD commands(beta)
Introduction to FreeBSD commands(beta)Introduction to FreeBSD commands(beta)
Introduction to FreeBSD commands(beta)
 
17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards
 
Server hardening methedologies
Server hardening methedologies Server hardening methedologies
Server hardening methedologies
 
Redis
RedisRedis
Redis
 
Unix tutorial for beginners
Unix tutorial for beginnersUnix tutorial for beginners
Unix tutorial for beginners
 
Linux standard file system
Linux standard file systemLinux standard file system
Linux standard file system
 
Basics of-linux
Basics of-linuxBasics of-linux
Basics of-linux
 
Rhel7 vs rhel6
Rhel7 vs rhel6Rhel7 vs rhel6
Rhel7 vs rhel6
 
Fuse- Filesystem in User space
Fuse- Filesystem in User space Fuse- Filesystem in User space
Fuse- Filesystem in User space
 
Linux permissions
Linux permissionsLinux permissions
Linux permissions
 
Linux basics
Linux basicsLinux basics
Linux basics
 
File permission in Linux
File permission in LinuxFile permission in Linux
File permission in Linux
 
Linux System Administration Crash Course
Linux System Administration Crash CourseLinux System Administration Crash Course
Linux System Administration Crash Course
 
A Brief History of the BSD File System
A Brief History of the BSD File SystemA Brief History of the BSD File System
A Brief History of the BSD File System
 
FUSE (Filesystem in Userspace) on OpenSolaris
FUSE (Filesystem in Userspace) on OpenSolarisFUSE (Filesystem in Userspace) on OpenSolaris
FUSE (Filesystem in Userspace) on OpenSolaris
 
Using The Unix Command Line
Using The Unix Command LineUsing The Unix Command Line
Using The Unix Command Line
 

Similar to Restricting unix users

Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework
Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security FrameworkLecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework
Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security FrameworkMohammed Farrag
 
Unix Security
Unix SecurityUnix Security
Unix Securityreplay21
 
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)Isabella789
 
Course 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsCourse 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsAhmed El-Arabawy
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxnanocdac
 
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationRH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationIsabella789
 
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationRH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationIsabella789
 
LINUX
LINUXLINUX
LINUXARJUN
 
Exploitation and distribution of setuid and setgid binaries on Linux systems
Exploitation and distribution of setuid and setgid binaries on Linux systemsExploitation and distribution of setuid and setgid binaries on Linux systems
Exploitation and distribution of setuid and setgid binaries on Linux systemsZero Science Lab
 

Similar to Restricting unix users (20)

Linux Security
Linux SecurityLinux Security
Linux Security
 
Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework
Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security FrameworkLecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework
Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework
 
Solaris basics
Solaris basicsSolaris basics
Solaris basics
 
Unix Security
Unix SecurityUnix Security
Unix Security
 
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
 
Course 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsCourse 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and Permissions
 
Host security
Host securityHost security
Host security
 
Host security
Host securityHost security
Host security
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Linux
Linux Linux
Linux
 
Linux remote
Linux remoteLinux remote
Linux remote
 
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationRH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux Certification
 
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationRH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux Certification
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
Linux security
Linux securityLinux security
Linux security
 
Basic orientation to Linux
Basic orientation to LinuxBasic orientation to Linux
Basic orientation to Linux
 
LINUX
LINUXLINUX
LINUX
 
Exploitation and distribution of setuid and setgid binaries on Linux systems
Exploitation and distribution of setuid and setgid binaries on Linux systemsExploitation and distribution of setuid and setgid binaries on Linux systems
Exploitation and distribution of setuid and setgid binaries on Linux systems
 

More from Muqthiyar Pasha

Printing in linux with cups
Printing in linux with cupsPrinting in linux with cups
Printing in linux with cupsMuqthiyar Pasha
 
Mount windows cdrom in linux
Mount windows cdrom in linuxMount windows cdrom in linux
Mount windows cdrom in linuxMuqthiyar Pasha
 
Forcefully unmount a linux disk partition
Forcefully unmount a linux disk partitionForcefully unmount a linux disk partition
Forcefully unmount a linux disk partitionMuqthiyar Pasha
 
Determine 64 or 32 bit unix kernel and hw
Determine  64 or 32 bit unix kernel and hwDetermine  64 or 32 bit unix kernel and hw
Determine 64 or 32 bit unix kernel and hwMuqthiyar Pasha
 
Unzip and extract tar.gz
Unzip and extract tar.gzUnzip and extract tar.gz
Unzip and extract tar.gzMuqthiyar Pasha
 
Oracle application tech stack tips and queries for troubleshooting advanced t...
Oracle application tech stack tips and queries for troubleshooting advanced t...Oracle application tech stack tips and queries for troubleshooting advanced t...
Oracle application tech stack tips and queries for troubleshooting advanced t...Muqthiyar Pasha
 
How to install oracle ops center 12c
How to install oracle ops center 12cHow to install oracle ops center 12c
How to install oracle ops center 12cMuqthiyar Pasha
 
Retrieve apps password in r12 or forgot apps password in r12
Retrieve apps password in r12 or forgot apps password in r12Retrieve apps password in r12 or forgot apps password in r12
Retrieve apps password in r12 or forgot apps password in r12Muqthiyar Pasha
 
Get to know oracle apps username and pwd
Get to know oracle apps username and pwdGet to know oracle apps username and pwd
Get to know oracle apps username and pwdMuqthiyar Pasha
 

More from Muqthiyar Pasha (10)

Printing in linux with cups
Printing in linux with cupsPrinting in linux with cups
Printing in linux with cups
 
Mount windows cdrom in linux
Mount windows cdrom in linuxMount windows cdrom in linux
Mount windows cdrom in linux
 
Find and zip files
Find and zip filesFind and zip files
Find and zip files
 
Forcefully unmount a linux disk partition
Forcefully unmount a linux disk partitionForcefully unmount a linux disk partition
Forcefully unmount a linux disk partition
 
Determine 64 or 32 bit unix kernel and hw
Determine  64 or 32 bit unix kernel and hwDetermine  64 or 32 bit unix kernel and hw
Determine 64 or 32 bit unix kernel and hw
 
Unzip and extract tar.gz
Unzip and extract tar.gzUnzip and extract tar.gz
Unzip and extract tar.gz
 
Oracle application tech stack tips and queries for troubleshooting advanced t...
Oracle application tech stack tips and queries for troubleshooting advanced t...Oracle application tech stack tips and queries for troubleshooting advanced t...
Oracle application tech stack tips and queries for troubleshooting advanced t...
 
How to install oracle ops center 12c
How to install oracle ops center 12cHow to install oracle ops center 12c
How to install oracle ops center 12c
 
Retrieve apps password in r12 or forgot apps password in r12
Retrieve apps password in r12 or forgot apps password in r12Retrieve apps password in r12 or forgot apps password in r12
Retrieve apps password in r12 or forgot apps password in r12
 
Get to know oracle apps username and pwd
Get to know oracle apps username and pwdGet to know oracle apps username and pwd
Get to know oracle apps username and pwd
 

Recently uploaded

The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationShrmpro
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 

Recently uploaded (20)

The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

Restricting unix users

  • 1. Restricting UNIX Users Users are inherently limited in what they can do on a UNIX system due to file permissions, passwords and other standard UNIX controls. However, it is often necessary to further restrict system users in other ways, both to protect them from themselves and to protect the system from the malicious or overly "playful" users. Change password Change Root password on periodic basis and limit access to other users, keep password expiration periods. File Permissions Let’s start from the weakest limitation one can impose: use of UNIX permissions. In fact, it is probably sufficient for most environments. While seemingly inflexible, permissions allow control over what binaries users can execute. If all binaries except the ones that need to be executed by the untrusted users are not world executable, and all user-writable partitions such as /tmp and /home are mounted with noexec flag (see man mount for the details on that), the security of the set-up is adequate. Noexec flag is needed to prevent users from downloading or building their own versions of binaries. If there is a pool of users that need the higher privileges, those can be gathered in a special group and binaries are made group-executable. Limits for all users (apparently, except "root"): File: /etc/security/limits.conf * hard core 0 * hard rss 10000 * hard nproc 100 Shown above are limits for the size of core files, resident memory for the process and number of owned processes. "Hard" limits cannot be changed by the user, while "soft" can. And for the specific group "lusers": @lusers hard core 0 @lusers hard rss 2000 @lusers hard nproc 200 @lusers hard fsize 100000 @lusers hard nofile 100 @lusers hard cpu 10 @lusers hard priority 5 # same as "nice -n 5" on all processes (in addition, maximum file size, number of open files, maximum CPU time and process priority are set)
  • 2. Restricted Shell The next degree of limitation is to be a restricted shell. In this case, a version of a normal bash shell will prevent users from changing the directory and environment variables, redirecting output, running commands with absolute pathnames, using exec command and some other actions. Restrictions are not enforced for shell scripts. See man bash for more details. Combining rbash with a restrictive configuration of UNIX permissions can help achieve further security. Rbash is a viable choice if you are trying to somewhat contain trusted users. Its restrictions can be easily overcome (see below). To test rbash restricted shell functionality: # adduser luser # ln -s /bin/bash /bin/rbash # echo "/bin/rbash" >> /etc/shells # chsh -s /bin/rbash luser # cd ~luser # su luser $ and then: $ cd / rbash: cd: restricted