Computing.Net > Forums > Unix > Keeping useres from logging in

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Keeping useres from logging in

Reply to Message Icon

Name: warshauer
Date: April 26, 2006 at 15:12:01 Pacific
OS: XP
CPU/Ram: PENTIUM
Product: DELL
Comment:

How does one keep users from logging into the system while we try to process month end?



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: April 26, 2006 at 15:44:27 Pacific
Reply:

Is this a unix question? Your OS says XP.


0

Response Number 2
Name: warshauer
Date: April 26, 2006 at 17:01:36 Pacific
Reply:

yes unix, sorry, habit


0

Response Number 3
Name: nails
Date: April 26, 2006 at 20:06:58 Pacific
Reply:

Hi:

This is one solution: Place the following in one of the login scripts such as /etc/profile

# keep users out
# get the user id
realuser=`/usr/bin/id|/usr/bin/sed -e 's,^[^(]*(,,' -e 's,).*$,,' -e 1q`
case $realuser in
root | nails )
;; # let these users is
*)
exit 0 # terminate the login process
;;
esac
# end case

Now, only root & nails can get into the system. Be careful! Obviously, this can be dangerous if you don't allow at least one valid user in.



0

Response Number 4
Name: unixhead
Date: April 29, 2006 at 20:43:53 Pacific
Reply:

man nologin


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Writing to/reading from 3... Status of a remote file u...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Keeping useres from logging in

how many users currently logged in www.computing.net/answers/unix/how-many-users-currently-logged-in/7394.html

add user from cgi script www.computing.net/answers/unix/add-user-from-cgi-script/5361.html

FTP in Unix www.computing.net/answers/unix/ftp-in-unix/1828.html