Exercises

team bbl


6.1

If the system uses a shadow file and we need to obtain the encrypted password, how do we do it?

6.2

If you have superuser access and your system uses shadow passwords, implement the previous exercise.

6.3

Write a program that calls uname and prints all the fields in the utsname structure. Compare the output to the output from the uname(1) command.

6.4

Calculate the latest time that can be represented by the time_t data type. After it wraps around, what happens?

6.5

Write a program to obtain the current time and print it using strftime, so that it looks like the default output from date(1). Set the TZ environment variable to different values and see what happens.

    team bbl



    Advanced Programming in the UNIX Environment
    Advanced Programming in the UNIX Environment, Second Edition (Addison-Wesley Professional Computing Series)
    ISBN: 0321525949
    EAN: 2147483647
    Year: 2005
    Pages: 370

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net